basalt-ui 2.22.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/CHANGELOG.md +68 -0
  2. package/MIGRATING.md +400 -12
  3. package/agent/agents/basalt-design-reviewer.md +3 -3
  4. package/agent/skills/basalt-design/SKILL.md +2 -2
  5. package/agent/skills/basalt-design/references/catalogue.md +22 -19
  6. package/agent/skills/basalt-design/references/states.md +39 -0
  7. package/dist/charts/BandStrip.d.ts.map +1 -1
  8. package/dist/charts/BandStrip.js +51 -5
  9. package/dist/charts/Bars.d.ts.map +1 -1
  10. package/dist/charts/Bars.js +19 -3
  11. package/dist/charts/CartesianChart.d.ts +2 -0
  12. package/dist/charts/CartesianChart.d.ts.map +1 -1
  13. package/dist/charts/CartesianChart.js +7 -3
  14. package/dist/charts/ChartCard.d.ts +1 -1
  15. package/dist/charts/ChartCard.d.ts.map +1 -1
  16. package/dist/charts/ChartCard.js +25 -15
  17. package/dist/charts/Sparkline.d.ts +8 -2
  18. package/dist/charts/Sparkline.d.ts.map +1 -1
  19. package/dist/charts/Sparkline.js +95 -15
  20. package/dist/charts/StackedArea.d.ts.map +1 -1
  21. package/dist/charts/StackedArea.js +5 -1
  22. package/dist/charts/band-fold.d.ts +22 -4
  23. package/dist/charts/band-fold.d.ts.map +1 -1
  24. package/dist/charts/band-fold.js +10 -2
  25. package/dist/charts/chart-dates.d.ts +12 -0
  26. package/dist/charts/chart-dates.d.ts.map +1 -0
  27. package/dist/charts/chart-dates.js +16 -0
  28. package/dist/charts/chart-legend.module.css +16 -0
  29. package/dist/charts/compile.d.ts +10 -0
  30. package/dist/charts/compile.d.ts.map +1 -1
  31. package/dist/charts/compile.js +77 -24
  32. package/dist/charts/date-tick-format.d.ts +5 -5
  33. package/dist/charts/date-tick-format.d.ts.map +1 -1
  34. package/dist/charts/date-tick-format.js +3 -7
  35. package/dist/charts/labels.d.ts +7 -3
  36. package/dist/charts/labels.d.ts.map +1 -1
  37. package/dist/charts/labels.js +28 -17
  38. package/dist/charts/legend.d.ts +0 -6
  39. package/dist/charts/legend.d.ts.map +1 -1
  40. package/dist/charts/legend.js +87 -35
  41. package/dist/charts/ref-label.d.ts +17 -0
  42. package/dist/charts/ref-label.d.ts.map +1 -1
  43. package/dist/charts/ref-label.js +13 -1
  44. package/dist/charts/sparkline.module.css +62 -12
  45. package/dist/charts/sparkline.module.css.d.ts +1 -0
  46. package/dist/charts/state.d.ts.map +1 -1
  47. package/dist/charts/state.js +4 -2
  48. package/dist/charts/types.d.ts +15 -3
  49. package/dist/charts/types.d.ts.map +1 -1
  50. package/dist/cli/shot/capture.d.ts.map +1 -1
  51. package/dist/cli/shot/capture.js +9 -5
  52. package/dist/cli/shot/detect.js +8 -5
  53. package/dist/cli/shot/measure.js +19 -23
  54. package/dist/cli/shot/playwright.d.ts +8 -0
  55. package/dist/cli/shot/playwright.d.ts.map +1 -1
  56. package/dist/cli/shot/playwright.js +5 -1
  57. package/dist/cli/shot/types.d.ts +2 -0
  58. package/dist/cli/shot/types.d.ts.map +1 -1
  59. package/dist/cli/tokens-css.d.ts +5 -7
  60. package/dist/cli/tokens-css.d.ts.map +1 -1
  61. package/dist/cli/tokens-css.js +11 -12
  62. package/dist/dashboard/bar-list.d.ts +6 -1
  63. package/dist/dashboard/bar-list.d.ts.map +1 -1
  64. package/dist/dashboard/bar-list.js +8 -0
  65. package/dist/dashboard/bar-list.module.css +18 -0
  66. package/dist/dashboard/delta-badge.d.ts.map +1 -1
  67. package/dist/dashboard/delta-badge.js +2 -2
  68. package/dist/dashboard/empty-state.d.ts.map +1 -1
  69. package/dist/dashboard/meter-model.d.ts +55 -21
  70. package/dist/dashboard/meter-model.d.ts.map +1 -1
  71. package/dist/dashboard/meter-model.js +98 -17
  72. package/dist/dashboard/meter-parts.d.ts +9 -2
  73. package/dist/dashboard/meter-parts.d.ts.map +1 -1
  74. package/dist/dashboard/meter-parts.js +99 -21
  75. package/dist/dashboard/meter.d.ts +21 -8
  76. package/dist/dashboard/meter.d.ts.map +1 -1
  77. package/dist/dashboard/meter.js +14 -3
  78. package/dist/dashboard/meter.module.css +57 -2
  79. package/dist/dashboard/meter.module.css.d.ts +5 -0
  80. package/dist/dashboard/query-state.d.ts +7 -3
  81. package/dist/dashboard/query-state.d.ts.map +1 -1
  82. package/dist/dashboard/query-state.js +15 -7
  83. package/dist/dashboard/section.d.ts +2 -1
  84. package/dist/dashboard/section.d.ts.map +1 -1
  85. package/dist/dashboard/section.module.css +12 -0
  86. package/dist/dashboard/settings-section.d.ts +1 -1
  87. package/dist/dashboard/settings-section.d.ts.map +1 -1
  88. package/dist/dashboard/settings-section.js +3 -3
  89. package/dist/dashboard/stat-card-parts.js +1 -1
  90. package/dist/dashboard/stat-card.module.css +43 -10
  91. package/dist/dashboard/stat-group.module.css +15 -0
  92. package/dist/dashboard/stat-strip.d.ts +16 -5
  93. package/dist/dashboard/stat-strip.d.ts.map +1 -1
  94. package/dist/dashboard/stat-strip.js +100 -74
  95. package/dist/dashboard/stat-strip.module.css +68 -62
  96. package/dist/dashboard/stat-strip.module.css.d.ts +1 -0
  97. package/dist/dashboard/widget-header.d.ts.map +1 -1
  98. package/dist/dashboard/widget-header.js +19 -1
  99. package/dist/dashboard/widget-header.module.css +6 -0
  100. package/dist/guard/index.d.ts +2 -2
  101. package/dist/guard/index.d.ts.map +1 -1
  102. package/dist/guard/index.js +1 -17
  103. package/dist/styles.css +18 -11
  104. package/dist/table/data-table.js +1 -1
  105. package/dist/theme/controls.module.css +19 -0
  106. package/dist/theme/controls.module.css.d.ts +1 -0
  107. package/dist/theme/index.d.ts.map +1 -1
  108. package/dist/theme/index.js +12 -7
  109. package/dist/theme/status-verdict.d.ts.map +1 -1
  110. package/dist/theme/status-verdict.js +9 -1
  111. package/dist/tokens/palette.d.ts +7 -10
  112. package/dist/tokens/palette.d.ts.map +1 -1
  113. package/dist/tokens/palette.js +7 -10
  114. package/llms.txt +7 -4
  115. package/package.json +1 -1
  116. package/src/charts/BandStrip.tsx +55 -5
  117. package/src/charts/Bars.tsx +31 -3
  118. package/src/charts/CartesianChart.tsx +9 -3
  119. package/src/charts/ChartCard.tsx +32 -19
  120. package/src/charts/Sparkline.tsx +139 -21
  121. package/src/charts/StackedArea.tsx +12 -1
  122. package/src/charts/band-fold.ts +25 -6
  123. package/src/charts/chart-dates.ts +30 -0
  124. package/src/charts/chart-legend.module.css +16 -0
  125. package/src/charts/compile.ts +148 -25
  126. package/src/charts/date-tick-format.ts +10 -13
  127. package/src/charts/labels.ts +43 -22
  128. package/src/charts/legend.tsx +70 -3
  129. package/src/charts/ref-label.ts +27 -0
  130. package/src/charts/sparkline.module.css +62 -12
  131. package/src/charts/sparkline.module.css.d.ts +1 -0
  132. package/src/charts/state.tsx +7 -4
  133. package/src/charts/types.ts +13 -3
  134. package/src/cli/shot/capture.ts +15 -3
  135. package/src/cli/shot/detect.ts +9 -9
  136. package/src/cli/shot/measure.ts +27 -27
  137. package/src/cli/shot/playwright.ts +18 -2
  138. package/src/cli/shot/types.ts +2 -0
  139. package/src/cli/tokens-css.ts +18 -20
  140. package/src/dashboard/bar-list.module.css +18 -0
  141. package/src/dashboard/bar-list.tsx +29 -0
  142. package/src/dashboard/delta-badge.tsx +6 -2
  143. package/src/dashboard/empty-state.tsx +4 -2
  144. package/src/dashboard/meter-model.ts +181 -47
  145. package/src/dashboard/meter-parts.tsx +187 -30
  146. package/src/dashboard/meter.module.css +57 -2
  147. package/src/dashboard/meter.module.css.d.ts +5 -0
  148. package/src/dashboard/meter.tsx +33 -10
  149. package/src/dashboard/query-state.tsx +20 -9
  150. package/src/dashboard/section.module.css +12 -0
  151. package/src/dashboard/section.tsx +2 -1
  152. package/src/dashboard/settings-section.tsx +4 -4
  153. package/src/dashboard/stat-card-parts.tsx +1 -1
  154. package/src/dashboard/stat-card.module.css +43 -10
  155. package/src/dashboard/stat-group.module.css +15 -0
  156. package/src/dashboard/stat-strip.module.css +68 -62
  157. package/src/dashboard/stat-strip.module.css.d.ts +1 -0
  158. package/src/dashboard/stat-strip.tsx +118 -59
  159. package/src/dashboard/widget-header.module.css +6 -0
  160. package/src/dashboard/widget-header.tsx +28 -1
  161. package/src/guard/index.ts +3 -19
  162. package/src/styles.css +18 -11
  163. package/src/table/data-table.tsx +1 -1
  164. package/src/theme/__snapshots__/plain-theme.test.ts.snap +14 -8
  165. package/src/theme/controls.module.css +19 -0
  166. package/src/theme/controls.module.css.d.ts +1 -0
  167. package/src/theme/index.ts +12 -7
  168. package/src/theme/status-verdict.tsx +5 -1
  169. package/src/tokens/palette.ts +7 -10
@@ -11,8 +11,8 @@ Method only; the law is `.claude/rules/basalt-*.md` and `./DESIGN.md`. Each step
11
11
  1. **Concept — mandatory, gating.** Nothing is built before the concept exists: write `docs/design/<screen>.md` (the user's question, the decision, datasets and chosen encodings, layout at 1440 and 390, copy, pass criteria) before any component code. Template: `references/concept.md`. Also read `./DESIGN.md` and the rules `basalt-tokens.md`, `basalt-mantine.md`, `basalt-controls.md`, `basalt-charts.md`; no `DESIGN.md`: run `/basalt-app` first.
12
12
  2. **Scenario.** Realistic fixture data. Decide which metrics earn a hue (trend, status, separation; the rest neutral), the one primary action per view, each control's home (a `SettingsRow` preference via `createLocalStore`, never `useState`).
13
13
  3. **Encoding: is it even a chart?** Run the router, then pick each encoding from the data's shape, then the shipped composite. A gap is reported, not routed around; no row fits the data → say so, never default to a number in a box. `references/catalogue.md`. A metric tile follows the slot contract in `references/stat-tile.md`.
14
- 4. **Build** with Mantine primitives and the composites; every color from `VX.*` or a series token. Chart kinds and `ChartCard` import from `basalt-ui/charts`, `BasaltDataTable` from `basalt-ui/table`, `FilterSet` and the other filters from `basalt-ui/controls`, the rest from `basalt-ui`. Hold the encoding law (`references/encoding-rules.md`: axes, color, tooltips, refetch, filters, number typography) and avoid the dashboard tells (`references/anti-defaults.md`: fact-only copy, uniform cards, one radius). Tune by eye in the theme lab (`dev.theme` Spotlight command, dev only) in both schemes, then bake values into the `derive` knobs of `createBasaltTheme` and series colors into `src/lib/series.ts`.
15
- 5. **Mark up for the board.** Tag each scored component `data-shot="<name>"`; hover and tooltip targets inside it get `data-shot-hover` / `data-shot-tooltip`; when the target's centre paints no readout (a donut's hole), add `data-shot-at="x,y"` (fractions of its box, e.g. `0.25,0.2`) and the shot hovers there. Declare supported states with `data-shot-states="empty loading error"` and render them when the `shot-state` URL param asks; a route declaring none is a P1 (`craft-7/no-declared-states`). An anchor legitimately absent in some states declares them with `data-shot-absent="empty error"`.
14
+ 4. **Build** with Mantine primitives and the composites; every color from `VX.*` or a series token. Chart kinds and `ChartCard` import from `basalt-ui/charts`, `BasaltDataTable` from `basalt-ui/table`, `FilterSet` and the other filters from `basalt-ui/controls`, the rest from `basalt-ui`. Hold the encoding law (`references/encoding-rules.md`: axes, color, tooltips, refetch, filters, number typography) and avoid the dashboard tells (`references/anti-defaults.md`: fact-only copy, uniform cards, one radius). Empty, loading and error copy follows `references/states.md`. Tune by eye in the theme lab (`dev.theme` Spotlight command, dev only) in both schemes, then bake values into the `derive` knobs of `createBasaltTheme` and series colors into `src/lib/series.ts`.
15
+ 5. **Mark up for the board.** Tag each scored component `data-shot="<name>"`; hover and tooltip targets inside it get `data-shot-hover` / `data-shot-tooltip`; when the target's centre paints no readout (a donut's hole), add `data-shot-at="x,y"` (fractions of its box, e.g. `0.25,0.2`) and the shot hovers there. Declare supported states with `data-shot-states="empty loading error"` and render them when the `shot-state` URL param asks; a route declaring none is a P2 (`craft-7/no-declared-states`), raised only when an anchor renders a state surface. An anchor legitimately absent in some states declares them with `data-shot-absent="empty error"`.
16
16
  6. **Rounds, at least three.** Playwright is the app's dev dependency: `bun add -d playwright && bunx playwright install chromium`. Then:
17
17
  - `basalt-ui shot <routes> --dist <built app>` (or `--base <url>` for a running server); a real, signed-in app (live data, no `data-shot` yet): `basalt-ui shot /overview --dist dist --api /api=https://app.example.com --local-storage auth-token=@env:APP_TOKEN --auto-anchors` seeds the token (app origin only; `@env:`/`@file:`, never inline), proxies GET/HEAD under `/api` (writes get 405 unless `--api-allow-writes`) and crops every large Card, Paper and table. One `--header authorization=@env:NAME` goes to EVERY `--api` origin (https required for any secret), never on a navigation. A redirect, 401/403/404, 5xx or dead API fails every shot of that page; a key the app already holds is never overwritten. These shots reach the reviewer subagent's model provider, the session's own: an app holding third parties' data should point `--api` at staging or synthetic data;
18
18
  - review with TWO isolated passes: (A) hand the out dir (`.basalt/shots`) to the `basalt-design-reviewer` subagent by name; it reads each component's contact sheet (`png/*__sheet.png`) and every page shot; (B) run the deterministic detector `basalt-ui shot detect` on the same out dir (exit 0 clean / 2 findings / 1 scan failure). A review the builder runs inline instead of the subagent starts with a `DEGRADED` banner and does not count as done;
@@ -17,25 +17,28 @@ Run this first. A "yes, chart" answer sends you to § 2.
17
17
 
18
18
  ## 2. Data shape to expression
19
19
 
20
- | Data shape | Encoding | basalt export (import path) | Not this |
21
- | ------------------------------------------------------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------ |
22
- | Single value with a trend | Figure, text delta, `qualifier`, axis-less sparkline with end dot along the bottom | `StatCard` (`basalt-ui`) + `sparkline` slot with `Sparkline` (`basalt-ui/charts`) | A bare number in a box |
23
- | Progress to a target | Filled track, target tick, end captions; extra cut-offs as `ticks` | `Meter` (`basalt-ui`) with `target`, `ticks` | A hand-rolled progress bar |
24
- | Committed vs forecast | Two segments, the forecast lighter, a tick and a caption at the boundary | `Meter` `segments`, `forecastCaption` | Two cards |
25
- | Headline ratio where the shape is the message | Ring, value centred, one per row | `Meter shape="ring"` | A donut plus a total card |
26
- | Reading in named bands (low / ok / high) | Zoned bar with the reading as a marker; `ticks` mark cut-offs or a window mean | `Meter` `zones`, `ticks` | Colour-only thresholds |
27
- | Part of a whole, 2–6 parts | One segmented bar, parts in order, captions under the segments | `Meter` `segments`; `Bars` stacked | A row of N `StatCard`s; a donut |
28
- | Part of a whole when the parts are the page's subject | Donut | `Donut` (`basalt-ui/charts`) | Donut beside a total card |
29
- | Ranked list, top N (5–10) | Label, bar on a shared scale, right-aligned value | `BarList` (`basalt-ui`), its default thin-track rows | A table with a `%` column |
30
- | Value over time | Line; stacked area for parts of a total | `Lines` / `StackedArea` in a `ChartCard` | A bar per day |
31
- | Compare categories | Bars | `Bars layout="grouped"` in a `ChartCard` | A pie |
32
- | Distribution as a slot micro-visual (`StatCard`, strip cell) | Small axis-less histogram | `Bars`, no axes, in the slot | A mean alone |
33
- | Distribution as a card's subject | One bar per bin, x labelled with the bin range ("€0–50"), y axis optional | `Bars` in a `ChartCard` | A mean alone; an axis-less histogram |
34
- | Status over time | Band strip; heat grid for daily data | `BandStrip` / `Heatmap` (`basalt-ui/charts`) | A table of dates |
35
- | Categorical status per cell (up, degraded, down) | Flat status fills; a glyph on warn and bad, never hue alone | `Heatmap` `states` with a `tone` each, no hex; `BandStrip` `glyph` | A hue-only grid |
36
- | A set of KPIs about one record | One joined surface, cells split by hairlines | `StatGroup variant="strip"` | N unrelated cards |
37
- | Many rows, several attributes | Table, right-aligned figures | `BasaltDataTable` (`basalt-ui/table`) | Cards per row |
38
- | Nothing yet / failed | Why and what to do | `EmptyState`, or the component's own `query` state | "No data" |
20
+ | Data shape | Encoding | basalt export (import path) | Not this |
21
+ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------------------------------------------- |
22
+ | Single value with a trend | Figure, text delta, `qualifier`, axis-less sparkline with end dot along the bottom | `StatCard` (`basalt-ui`) + `sparkline` slot with `Sparkline` (`basalt-ui/charts`) | A bare number in a box |
23
+ | Progress to a target | Filled track, target tick, end captions; extra cut-offs as `ticks` | `Meter` (`basalt-ui`) with `target`, `ticks` | A hand-rolled progress bar |
24
+ | Committed vs forecast | Two segments, the forecast lighter, a tick and a caption at the boundary | `Meter` `segments`, `forecastCaption` | Two cards |
25
+ | Headline ratio where the shape is the message | Ring, value centred, one per row | `Meter shape="ring"` | A donut plus a total card |
26
+ | Reading in named bands (low / ok / high) | Zoned bar with the reading as a marker; each zone names its `short` label for a narrow track; `ticks` mark cut-offs or a window mean | `Meter` `zones`, `ticks` | Colour-only thresholds |
27
+ | Part of a whole, 2–6 parts | One segmented bar, parts in order, captions under the segments | `Meter` `segments`; `Bars` stacked | A row of N `StatCard`s; a donut |
28
+ | Part of a whole when the parts are the page's subject | Donut | `Donut` (`basalt-ui/charts`) | Donut beside a total card |
29
+ | Ranked list, top N (5–10) | Label, bar on a shared scale, right-aligned value | `BarList` (`basalt-ui`), its default thin-track rows | A table with a `%` column |
30
+ | Value over time | Line; stacked area for parts of a total | `Lines` / `StackedArea` in a `ChartCard` | A bar per day |
31
+ | Spend over a period against a budget | Cumulative line against the budget line; the forecast end labelled with its figure and date, the budget crossing labelled. Strip form: `Meter` with the reading at the fill end and the target figure on the tick via `caption` | `Lines` + `refLines` in a `ChartCard`; `Meter` `target`, `ticks` | A daily bar per day; an unlabelled forecast |
32
+ | Compare categories | Bars | `Bars layout="grouped"` in a `ChartCard` | A pie |
33
+ | Distribution as a slot micro-visual (`StatCard`, strip cell) | Small axis-less histogram | `Bars`, no axes, in the slot | A mean alone |
34
+ | Distribution as a card's subject | One bar per bin, x labelled with the bin range ("€0–50"), y axis optional | `Bars` in a `ChartCard` | A mean alone; an axis-less histogram |
35
+ | Status over time | Band strip; heat grid for daily data | `BandStrip` / `Heatmap` (`basalt-ui/charts`) | A table of dates |
36
+ | Categorical status per cell (up, degraded, down) | Flat status fills; a glyph on warn and bad, never hue alone | `Heatmap` `states` with a `tone` each, no hex; `BandStrip` `glyph` | A hue-only grid |
37
+ | A set of KPIs about one record | One joined surface, cells split by hairlines | `StatGroup variant="strip"` | N unrelated cards |
38
+ | Many rows, several attributes | Table, right-aligned figures | `BasaltDataTable` (`basalt-ui/table`) | Cards per row |
39
+ | Nothing yet / failed | Why and what to do | `EmptyState`, or the component's own `query` state | "No data" |
40
+
41
+ Sections that sit side by side use one title size; a `Section` beside a `ChartCard` does not step a size down.
39
42
 
40
43
  ## Not shipped — report the gap, don't hand-roll
41
44
 
@@ -0,0 +1,39 @@
1
+ # State copy — why, and what to do next
2
+
3
+ Every empty, loading and error state answers two things: why, and what the reader does next. The reviewer cites this file for Communication 6. Components own the shape (`EmptyState`, the `query` branch, `ChartCard` `state`); you own the words.
4
+
5
+ ## Per state
6
+
7
+ | State | Say | Never |
8
+ | ------- | --------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
9
+ | Empty | The cause, then the next step. A filter caused it: name the filter and offer the reset | A bare "No data"; a false zero (a missing value renders as `—`, not `0`) |
10
+ | Loading | A skeleton in the section's or card's loaded shape, the same height (`QueryState.loading` takes it) | An accent spinner in a card; "Loading…" text; wording that reads as an error; a skeleton far shorter than the loaded body |
11
+ | Error | One title, "Could not load <thing>" (the dot is the glyph); the cause in one line; one Retry | An empty-state glyph (a magnifying glass) on a failure; a second button; a red panel; "Oops" |
12
+
13
+ One wording per repeated gap: the same missing source reads the same on every card that depends on it. Write it once and pass it to each (`emptyText`, `ChartCard` `state`), never rephrase per card.
14
+
15
+ The default error title is a bare "Could not load" and relies on the host's title naming the thing; outside a titled host the title must name it ("Could not load <thing>"): `QueryState.errorTitle` / `QueryState.errorFallback`, `ErrorState.title` / `ErrorState.fallback`, and `ChartCard` `stateNoun` on a chart. "The request failed." is the fallback only, never a cause: the real cause is the server message or the fallback prop. The table's empty default ("No data to display.") is a fallback too; pass `emptyState` with the cause and the next step.
16
+
17
+ ## Do / don't, on three shapes
18
+
19
+ A decision queue (items with ages and states):
20
+
21
+ | Do | Don't |
22
+ | ----------------------------------------------------------------------------------------------------------------------- | ---------------------- |
23
+ | Empty (table `emptyState`, `EmptyState`): "No decisions are waiting. New ones appear when an agent asks for a verdict." | "No data" |
24
+ | Filtered: "No blocked decisions older than 2 d. Clear the age filter to see all 12." | "No results found" |
25
+ | Error: "Could not load decisions" / "The queue service did not answer.", Retry | "Something went wrong" |
26
+
27
+ A health score with zones (low / ok / high):
28
+
29
+ | Do | Don't |
30
+ | --------------------------------------------------------------------------- | ----------------------------- |
31
+ | No reading yet: the figure is `—`, the caption "No sleep logged since Tue." | `0`, or a marker on the track |
32
+ | Loading: a track-shaped skeleton at the Meter's height | A centred spinner |
33
+
34
+ A cost ledger against a budget:
35
+
36
+ | Do | Don't |
37
+ | ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------- |
38
+ | Empty month (`StatCard` `emptyText`, `ChartCard` `state={{ empty }}`): "No spend recorded in October. Costs appear after the first billed run." | A flat line at `$0` that reads as "free" |
39
+ | One missing source on three cards: "Billing export unavailable" on each, worded identically | Three phrasings of the same gap |
@@ -1 +1 @@
1
- {"version":3,"file":"BandStrip.d.ts","sourceRoot":"","sources":["../../src/charts/BandStrip.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAMzC,OAAO,KAAK,EAAS,eAAe,EAAE,MAAM,aAAa,CAAA;AAGzD,OAAO,KAAK,EAEV,mBAAmB,EAGnB,MAAM,EAGP,MAAM,SAAS,CAAA;AAEhB,gGAAgG;AAChG,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,eAAe,GAAG;IACjD;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC,GAAG,SAAS,CAAA;CACpD,CAAA;AAED,2DAA2D;AAC3D,MAAM,MAAM,QAAQ,GAAG;IACrB,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IACnC;;;OAGG;IACH,MAAM,CAAC,EACH;QACE,0CAA0C;QAC1C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;QAC1B,uEAAuE;QACvE,KAAK,CAAC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,CAAC,GAAG;QAAE,GAAG,EAAE,CAAC,CAAA;KAAE,CAAC,EAAE,CAAA;IACpD,oGAAoG;IACpG,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,QAAQ,CAAA;IAC3B,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;IAC9B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CAC5B,CAAA;AA2OD,wBAAgB,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAC/E,KAAK,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,GAC7B,YAAY,CAgLd"}
@@ -8,7 +8,14 @@ import { oneOf, requiredProp } from "../common/errors.js";
8
8
  import { NON_FINITE } from "../format/shared.js";
9
9
  import { VX, alpha } from "../tokens/index.js";
10
10
  import { CartesianRung } from "./CartesianChart.js";
11
- import { GLYPH_MIN_PX, glyphOf, groupsOf, resolveNamedState } from "./band-fold.js";
11
+ import {
12
+ BAND_GLYPH_MIN_PX,
13
+ NOTCH_PX,
14
+ glyphOf,
15
+ groupsOf,
16
+ resolveNamedState,
17
+ toneOf
18
+ } from "./band-fold.js";
12
19
  import { emphasis } from "./marks.js";
13
20
  import { rowX } from "./types.js";
14
21
  const DEFAULT_MIN_BAND_PX = 3;
@@ -95,6 +102,7 @@ function layoutBands(input) {
95
102
  };
96
103
  const hits = [];
97
104
  const glyphs = [];
105
+ const notches = /* @__PURE__ */ new Map();
98
106
  for (const g of groups) {
99
107
  const datum = fold && g.items.length > 1 ? fold.merge(g.items) : g.items[0];
100
108
  if (datum === void 0) continue;
@@ -103,9 +111,26 @@ function layoutBands(input) {
103
111
  const answers = paintSpan(ctx, span, cell);
104
112
  const named = input.states.get(span.state);
105
113
  const glyph = named && glyphOf(named);
106
- if (answers.primary && glyph && (cell.f1 - cell.f0) * input.width >= GLYPH_MIN_PX) {
114
+ if (answers.primary && glyph) {
107
115
  const share = absentShareOf(span, absentKey);
108
- glyphs.push({ f: cell.f0 + (cell.f1 - cell.f0) * (1 - share) / 2, glyph });
116
+ const width = cell.f1 - cell.f0;
117
+ if (width * input.width >= BAND_GLYPH_MIN_PX - 1e-6)
118
+ glyphs.push({ f: cell.f0 + width * (1 - share) / 2, glyph });
119
+ else {
120
+ const px = NOTCH_PX[toneOf(named) === "bad" ? "bad" : "warn"];
121
+ const fill = span.fill ?? named.color;
122
+ paintInto(
123
+ notches,
124
+ `color-mix(in srgb, ${fill} 50%, ${VX.ink})`,
125
+ input.emphasis(span.state),
126
+ {
127
+ f0: cell.f0,
128
+ f1: cell.f0 + width * (1 - share),
129
+ y0: 0,
130
+ y1: Math.min(px / Math.max(input.height, 1), 0.5)
131
+ }
132
+ );
133
+ }
109
134
  }
110
135
  g.items.forEach((source, i) => {
111
136
  const slot = g.start + i;
@@ -114,7 +139,13 @@ function layoutBands(input) {
114
139
  hits.push({ slot, source, state: absentKey, datum });
115
140
  });
116
141
  }
117
- return { base: [...ctx.base.values()], markers: [...ctx.markers.values()], hits, glyphs };
142
+ return {
143
+ base: [...ctx.base.values()],
144
+ markers: [...ctx.markers.values()],
145
+ hits,
146
+ glyphs,
147
+ notches: [...notches.values()]
148
+ };
118
149
  }
119
150
  function BandStrip(props) {
120
151
  const {
@@ -155,7 +186,7 @@ function BandStrip(props) {
155
186
  );
156
187
  const marks = useCallback(
157
188
  (plot) => {
158
- const { base, markers, hits, glyphs } = layoutBands({
189
+ const { base, markers, hits, glyphs, notches } = layoutBands({
159
190
  data,
160
191
  getBand,
161
192
  fold,
@@ -188,6 +219,21 @@ function BandStrip(props) {
188
219
  })
189
220
  )
190
221
  ),
222
+ ...notches.map(
223
+ ({ fill, opacity, cells }, i) => decorative(
224
+ rect(cells, {
225
+ id: `band-notches-${i}`,
226
+ x1: "f0",
227
+ x2: "f1",
228
+ y1: "y0",
229
+ y2: "y1",
230
+ xScale: "zx",
231
+ fill,
232
+ inset: 0,
233
+ ...opacity < 1 && { fillOpacity: opacity }
234
+ })
235
+ )
236
+ ),
191
237
  ...glyphs.length > 0 ? [
192
238
  decorative(
193
239
  text(glyphs, {
@@ -1 +1 @@
1
- {"version":3,"file":"Bars.d.ts","sourceRoot":"","sources":["../../src/charts/Bars.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAIzC,OAAO,KAAK,EACV,mBAAmB,EAEnB,WAAW,EACX,MAAM,EAGP,MAAM,SAAS,CAAA;AAEhB,oDAAoD;AACpD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,IAAI,CAC3B,WAAW,CAAC,CAAC,CAAC,EACd,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAChG,GAAG;IACF,oBAAoB;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACjC,CAAA;AAED,8DAA8D;AAC9D,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,IAAI,CAC5B,WAAW,CAAC,CAAC,CAAC,EACZ,KAAK,GACL,OAAO,GACP,OAAO,GACP,UAAU,GACV,aAAa,GACb,SAAS,GACT,QAAQ,GACR,MAAM,GACN,MAAM,GACN,MAAM,GACN,MAAM,GACN,OAAO,GACP,aAAa,GACb,eAAe,CAClB,CAAA;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,IAAI,CACxD,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,EACzB,OAAO,GAAG,QAAQ,CACnB,GAAG;IACF,IAAI,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3B,KAAK,CAAC,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAA;IAC1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AC,CAAC,EAAE,CAAC,CAAC,EACzB,OAAO,GAAG,QAAQ,CACnB,GAAG;IACF,IAAI,EAAE,SAAS,OAAO,CAAC,CAAC,CAAC,EAAE,CAAA;IAC3B,KAAK,CAAC,EAAE,SAAS,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,SAAS,CAAA;IAC1C,mFAAmF;IACnF,MAAM,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CAAA;IACzD,6JAA6J;IAC7J,UAAU,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,SAAS,CAAA;CACzD,CAAA;AAyCD,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,YAAY,CAiFvF"}
@@ -4,9 +4,20 @@ import { group } from "@tanstack/charts/group";
4
4
  import { stack } from "@tanstack/charts/stack";
5
5
  import { useCallback, useMemo } from "react";
6
6
  import { CartesianRung } from "./CartesianChart.js";
7
+ import { VX } from "../tokens/index.js";
7
8
  import { emphasis, lineMark } from "./marks.js";
8
9
  import { rowX } from "./types.js";
9
10
  const DEFAULT_BAR_OPACITY = 0.85;
11
+ const SHADE_FLOOR = 0.4;
12
+ function shadeSharedColors(bars, barOpacity) {
13
+ if (barOpacity !== void 0) return bars;
14
+ return bars.map((b) => {
15
+ const group2 = bars.filter((o) => o.color === b.color);
16
+ if (group2.length < 2 || group2.some((g) => g.fillOpacity !== void 0)) return b;
17
+ const step = (1 - SHADE_FLOOR) / (group2.length - 1);
18
+ return { ...b, fillOpacity: 1 - group2.indexOf(b) * step };
19
+ });
20
+ }
10
21
  const paint = (color, opacity) => opacity >= 1 ? color : `color-mix(in srgb, ${color} ${Math.round(opacity * 100)}%, transparent)`;
11
22
  let warnedLogStack = false;
12
23
  function guardLogStack(layout, onLog) {
@@ -17,7 +28,9 @@ function guardLogStack(layout, onLog) {
17
28
  warnedLogStack = true;
18
29
  }
19
30
  function Bars(props) {
20
- const { bars, lines, layout = "stacked", barOpacity, ...rest } = props;
31
+ const { bars: given, lines, layout = "stacked", barOpacity, ...rest } = props;
32
+ const bars = useMemo(() => shadeSharedColors(given, barOpacity), [given, barOpacity]);
33
+ const sharedColor = bars.some((b, i) => bars.findIndex((o) => o.color === b.color) !== i);
21
34
  guardLogStack(layout, bars.length > 0 && rest.y?.scale === "log");
22
35
  const sample = rest.data[0];
23
36
  const series = useMemo(
@@ -57,8 +70,10 @@ function Bars(props) {
57
70
  y: "y",
58
71
  z: "series",
59
72
  fill,
73
+ // Series of one colour differ by shade alone: a surface hairline keeps stacked segments apart.
74
+ ...sharedColor && layout !== "grouped" && { stroke: VX.surface.panel, strokeWidth: 1 },
60
75
  // The hovered x is its own highlight: the bar reads at full strength (no dimming, no
61
- // point marker, no crosshair rule: that is line-chart chrome).
76
+ // point marker, no crosshair rule: that is line-chart chrome; `focusRing={false}` on the rung).
62
77
  states: [{ when: { focus: "x" }, style: { fill: solid } }],
63
78
  layout: layout === "grouped" ? group({ padding: 0.1 }) : stack({ order, ...layout === "normalized" && { offset: "normalize" } })
64
79
  })
@@ -69,7 +84,7 @@ function Bars(props) {
69
84
  }
70
85
  return out;
71
86
  },
72
- [bars, layout, barOpacity]
87
+ [bars, layout, barOpacity, sharedColor]
73
88
  );
74
89
  return /* @__PURE__ */ jsx(
75
90
  CartesianRung,
@@ -79,6 +94,7 @@ function Bars(props) {
79
94
  marks,
80
95
  band: true,
81
96
  crosshair: false,
97
+ focusRing: false,
82
98
  reverseRows: layout !== "grouped",
83
99
  ...layout !== "grouped" && { stack: layout }
84
100
  }
@@ -14,6 +14,8 @@ export type RungOptions = {
14
14
  tooltipBelow?: boolean;
15
15
  /** No vertical rule under the cursor (a bar kind's hover is the bar itself). */
16
16
  crosshair?: boolean;
17
+ /** No engine point marker on the focused datum (a bar kind's hover is the bar itself). */
18
+ focusRing?: boolean;
17
19
  /** The legend goes from the wide class up, where `Lines`' end labels name the series. */
18
20
  hideLegendAtWide?: boolean;
19
21
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../src/charts/CartesianChart.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAiB,YAAY,EAAa,MAAM,OAAO,CAAA;AAGnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAEpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAK/C,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEvE,6DAA6D;AAC7D,MAAM,MAAM,WAAW,GAAG;IACxB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,yDAAyD;IACzD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,sDAAsD;IACtD,KAAK,CAAC,EAAE,SAAS,GAAG,YAAY,CAAA;IAChC,8FAA8F;IAC9F,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,gFAAgF;IAChF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,yFAAyF;IACzF,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAgCD,kGAAkG;AAClG,MAAM,MAAM,YAAY,GAAG;IACzB,gDAAgD;IAChD,OAAO,EAAE,MAAM,CAAA;IACf,8CAA8C;IAC9C,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC3B,0CAA0C;IAC1C,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,gCAAgC;IAChC,MAAM,EAAE,OAAO,CAAA;IACf,gFAAgF;IAChF,KAAK,EAAE,MAAM,CAAA;IACb,gFAAgF;IAChF,IAAI,EAAE,SAAS,GAAG,IAAI,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,CAAC,CAAC,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,KAAK,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,YAAY,CAkFrE;AAED,wBAAgB,aAAa,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAC/C,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,WAAW,GAC7C,YAAY,CA8Bd;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EAChD,KAAK,EAAE,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC/B,YAAY,CAEd"}
@@ -1,7 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useCallback, useId, useMemo, useState } from "react";
3
3
  import { useInChartCard } from "./card-context.js";
4
- import { compileCartesian, refLegendSeries } from "./compile.js";
4
+ import { compileCartesian, refLegendSeries, zoneLegendSeries } from "./compile.js";
5
5
  import { samePlots } from "./plot-context.js";
6
6
  import { ChartEngine, idPrefixOf } from "./host.js";
7
7
  import { ChartLegend, legendEntries } from "./legend.js";
@@ -107,8 +107,12 @@ function CartesianRung(props) {
107
107
  [stable]
108
108
  );
109
109
  const legendSeries = useMemo(
110
- () => [...stable.series, ...refLegendSeries(stable.refLines)],
111
- [stable.series, stable.refLines]
110
+ () => [
111
+ ...stable.series,
112
+ ...refLegendSeries(stable.refLines),
113
+ ...zoneLegendSeries(stable.zones)
114
+ ],
115
+ [stable.series, stable.refLines, stable.zones]
112
116
  );
113
117
  return /* @__PURE__ */ jsx(
114
118
  ChartShell,
@@ -9,7 +9,7 @@ export type ChartFact = {
9
9
  /** Usually a `DeltaBadge`. */
10
10
  comparison?: ReactNode;
11
11
  /** Plain text the figure covers, e.g. `last 30 d`. A list is joined by ` · ` (`['last entry 3 d
12
- * ago', '12 entries']`). */
12
+ * ago', '12 entries']`) and, behind a `unit`, led by one. */
13
13
  period?: string | readonly string[] | undefined;
14
14
  /** Ink for the whole fact (text only, never a fill): a stale or off-target figure reads `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AS,EACT,UAAU,EACV,KAAK,EACL,QAAQ,EACR,KAAK,EACL,GAAG,MAAM,EACV,EAAE,cAAc,GAAG,YAAY,CAqD/B"}
@@ -55,6 +55,13 @@ const bodyClipStyle = {
55
55
  flexDirection: "column",
56
56
  padding: "2px var(--vx-space-card-inset-x, 1rem) var(--vx-space-card-inset-y, 0.75rem)"
57
57
  };
58
+ const PERIOD_SEPARATOR = "\xB7 ";
59
+ function periodText(period, afterUnit) {
60
+ if (typeof period === "string") return period;
61
+ if (period.length === 0) return "";
62
+ const text = period.join(" \xB7 ");
63
+ return afterUnit && !text.startsWith(PERIOD_SEPARATOR.trim()) ? PERIOD_SEPARATOR + text : text;
64
+ }
58
65
  const definedOnly = (o) => Object.fromEntries(Object.entries(o).filter(([, v]) => v !== void 0));
59
66
  const HEADER_TRIGGERS = ["title", "info", "value", "icon", "count"];
60
67
  function Facts({
@@ -70,21 +77,24 @@ function Facts({
70
77
  "data-basalt-facts-row": "",
71
78
  ...stale && { "data-stale": "true" },
72
79
  className: classes.factsRow,
73
- children: list.map((f, i) => /* @__PURE__ */ jsxs(
74
- "span",
75
- {
76
- "data-basalt-fact": "",
77
- ...f.tone !== void 0 && { "data-tone": f.tone },
78
- className: classes.fact,
79
- children: [
80
- /* @__PURE__ */ jsx("span", { "data-basalt-fact-value": "", className: classes.factValue, children: f.value }),
81
- f.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.factUnit, children: f.unit }),
82
- f.comparison,
83
- f.period !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.factPeriod, children: typeof f.period === "string" ? f.period : f.period.join(" \xB7 ") })
84
- ]
85
- },
86
- i
87
- ))
80
+ children: list.map((f, i) => {
81
+ const period = f.period === void 0 ? "" : periodText(f.period, f.unit !== void 0);
82
+ return /* @__PURE__ */ jsxs(
83
+ "span",
84
+ {
85
+ "data-basalt-fact": "",
86
+ ...f.tone !== void 0 && { "data-tone": f.tone },
87
+ className: classes.fact,
88
+ children: [
89
+ /* @__PURE__ */ jsx("span", { "data-basalt-fact-value": "", className: classes.factValue, children: f.value }),
90
+ f.unit !== void 0 && /* @__PURE__ */ jsx("span", { className: classes.factUnit, children: f.unit }),
91
+ f.comparison,
92
+ period !== "" && /* @__PURE__ */ jsx("span", { className: classes.factPeriod, children: period })
93
+ ]
94
+ },
95
+ i
96
+ );
97
+ })
88
98
  }
89
99
  ),
90
100
  basis !== void 0 && /* @__PURE__ */ jsx("p", { "data-basalt-facts-basis": "", className: classes.factsBasis, children: basis })
@@ -4,7 +4,12 @@ import type { ChartState } from './types.js';
4
4
  export type SparklineProps = BasaltProps & {
5
5
  /** The accessible name. Required: a chart without one is an unlabeled image. */
6
6
  ariaLabel: string;
7
- data: readonly number[];
7
+ /** The values, or `{ at, value }` points: `at` (a Date, epoch ms or ISO string) names the point in
8
+ * the readout, as a day or, within one day, an hour, in the page's format locale. */
9
+ data: readonly number[] | readonly {
10
+ at: Date | number | string;
11
+ value: number;
12
+ }[];
8
13
  /** Height in px. */
9
14
  height: number;
10
15
  /** Width in px. Default: the container's, measured by the host. */
@@ -33,7 +38,8 @@ export type SparklineProps = BasaltProps & {
33
38
  /** Formats the readout's value. Default: the compact number format. */
34
39
  format?: ((value: number) => string) | undefined;
35
40
  /** The readout's x label per point, index-aligned with `data`: pass the point's day ("12 Oct"),
36
- * and the readout reads `3 items · 12 Oct` beside the point. Omitted: the value alone. */
41
+ * and the readout reads `3 items · 12 Oct` beside the point. Omitted: the moment of an `{ at }`
42
+ * point, else the value alone. */
37
43
  labels?: readonly string[] | undefined;
38
44
  };
39
45
  type Point = {
@@ -1 +1 @@
1
- {"version":3,"file":"Sparkline.d.ts","sourceRoot":"","sources":["../../src/charts/Sparkline.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAA0D,YAAY,EAAE,MAAM,OAAO,CAAA;AAEjG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAUlD,OAAO,KAAK,EAAc,UAAU,EAAE,MAAM,SA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