derive-dashboards 0.7.0 → 0.8.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 (49) hide show
  1. package/README.md +1 -1
  2. package/dist/charts/kinds/area-marks.mjs +20 -19
  3. package/dist/charts/kinds/grid-marks.mjs +8 -10
  4. package/dist/charts/kinds/grid-words.mjs +1 -1
  5. package/dist/charts/kinds/grid.d.mts +1 -1
  6. package/dist/charts/kinds/grid.mjs +3 -2
  7. package/dist/charts/marks/axes.mjs +2 -1
  8. package/dist/charts/marks/x-axis.mjs +3 -2
  9. package/dist/charts/scene/types.d.mts +1 -1
  10. package/dist/charts/theme.d.mts +25 -25
  11. package/dist/charts/theme.mjs +35 -27
  12. package/dist/charts-react/plan-grid.mjs +1 -1
  13. package/dist/core/document/display.d.mts +1 -0
  14. package/dist/core/document/display.mjs +3 -1
  15. package/dist/core/engine/version.d.mts +1 -1
  16. package/dist/core/engine/version.mjs +1 -1
  17. package/dist/core/time/bucket.d.mts +2 -1
  18. package/dist/core/time/bucket.mjs +6 -2
  19. package/dist/core/time/zone.d.mts +6 -1
  20. package/dist/core/time/zone.mjs +11 -2
  21. package/dist/llms.txt +1 -1
  22. package/dist/react/Canvas.mjs +7 -7
  23. package/dist/react/Dashboard.d.mts +6 -0
  24. package/dist/react/Dashboard.mjs +1 -0
  25. package/dist/react/Header.mjs +21 -17
  26. package/dist/react/builder/Time.mjs +1 -1
  27. package/dist/react/builder/words.d.mts +2 -1
  28. package/dist/react/builder/words.mjs +1 -1
  29. package/dist/react/columns.mjs +9 -1
  30. package/dist/react/drill/board.mjs +1 -0
  31. package/dist/react/drill/props.d.mts +2 -1
  32. package/dist/react/drill/props.mjs +8 -5
  33. package/dist/react/english.mjs +6 -6
  34. package/dist/react/format.d.mts +1 -1
  35. package/dist/react/format.mjs +25 -6
  36. package/dist/react/headline.d.mts +9 -0
  37. package/dist/react/headline.mjs +51 -0
  38. package/dist/react/index.d.mts +3 -2
  39. package/dist/react/index.mjs +4 -3
  40. package/dist/react/messages.d.mts +1 -0
  41. package/dist/react/place.mjs +4 -2
  42. package/dist/react/renderers/index.mjs +31 -8
  43. package/dist/react/theme-unlayered.css +1 -1
  44. package/dist/react/theme.css +1 -1
  45. package/dist/recharts/bar.mjs +2 -2
  46. package/dist/recharts/line.mjs +2 -2
  47. package/dist/recharts/parts.mjs +3 -1
  48. package/dist/skills/derive-dashboards/SKILL.md +3 -2
  49. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { axisWidth, endRoom, yAxis } from "./axis.mjs";
2
2
  import { openPoint } from "./marks.mjs";
3
- import { CHART, TOOLTIP, legendText, runningLabel, seriesColors, tooltipFormat, tooltipLabel } from "./parts.mjs";
3
+ import { CHART, GRID, TOOLTIP, legendText, runningLabel, seriesColors, tooltipFormat, tooltipLabel } from "./parts.mjs";
4
4
  import { toSeries } from "./series.mjs";
5
5
  import { Beside } from "./table.mjs";
6
6
  import { addsUp } from "derive-dashboards/core";
@@ -123,7 +123,7 @@ function BarTile(props) {
123
123
  layout: overTime ? "horizontal" : "vertical",
124
124
  children: [
125
125
  /* @__PURE__ */ jsx(CartesianGrid, {
126
- stroke: "var(--dd-line)",
126
+ stroke: GRID,
127
127
  vertical: !overTime,
128
128
  horizontal: overTime
129
129
  }),
@@ -1,6 +1,6 @@
1
1
  import { yAxes } from "./axes.mjs";
2
2
  import { openPoint } from "./marks.mjs";
3
- import { CHART, TOOLTIP, dashOf, legendText, runningLabel, seriesColors, tooltipFormat, tooltipLabel } from "./parts.mjs";
3
+ import { CHART, GRID, TOOLTIP, dashOf, legendText, runningLabel, seriesColors, tooltipFormat, tooltipLabel } from "./parts.mjs";
4
4
  import { toSeries } from "./series.mjs";
5
5
  import { Beside } from "./table.mjs";
6
6
  import { useState } from "react";
@@ -67,7 +67,7 @@ function LineTile(props) {
67
67
  ...drill === void 0 ? {} : { onClick },
68
68
  children: [
69
69
  /* @__PURE__ */ jsx(CartesianGrid, {
70
- stroke: "var(--dd-line)",
70
+ stroke: GRID,
71
71
  vertical: false
72
72
  }),
73
73
  /* @__PURE__ */ jsx(XAxis, {
@@ -75,6 +75,8 @@ const tooltipLabel = (props, running) => (label) => [
75
75
  /** The x label of the last point when its time bucket is still running. */
76
76
  const runningLabel = (props, points) => lastBucketOpen(props.answer) ? points.at(-1)?.x : void 0;
77
77
  /** The tooltip in the theme's colors, light and dark; the hover band a soft wash, not a gray slab. */
78
+ /** A plot's gridlines: the softer of the theme's two rules, so a host's heavy border leaves a plot quiet. */
79
+ const GRID = "var(--dd-line-soft, var(--dd-line))";
78
80
  const TOOLTIP = {
79
81
  separator: ": ",
80
82
  contentStyle: {
@@ -100,4 +102,4 @@ const CHART = {
100
102
  left: 0
101
103
  }
102
104
  };
103
- export { CHART, TOOLTIP, dashOf, legendText, runningLabel, seriesColors, tooltipFormat, tooltipLabel };
105
+ export { CHART, GRID, TOOLTIP, dashOf, legendText, runningLabel, seriesColors, tooltipFormat, tooltipLabel };
@@ -37,7 +37,7 @@ Check, and say what you found:
37
37
  5. UI: import `derive-dashboards/react/theme.css`; `createDashboardsClient<typeof dashboards>()`
38
38
  (import the server's type only); `<DashboardsProvider client renderers={RECHARTS_RENDERERS}
39
39
  viewerKey={user.id}><Dashboard id="default:overview" /></DashboardsProvider>`. For more kinds
40
- of chart (area, small multiples, heat grid, funnel) and no `recharts` to install, pass
40
+ of chart (area, small multiples, heatmap, funnel) and no `recharts` to install, pass
41
41
  `CHARTS_RENDERERS` from `derive-dashboards/charts-react` instead and import its `chart.css`
42
42
  (`docs/react.md`, Charts). Use `display.against` on category bars, `display.share` on stacked areas, and `display.ownScales` for independent panel scales.
43
43
  6. `npx derive-dashboards doctor` prints each piece of the setup as `ok` or `fix` with its one
@@ -58,7 +58,8 @@ app (Base UI or Radix), `npx derive-dashboards add filter-bar`.
58
58
 
59
59
  A widget's `kind` picks its tile (`number`, `table`, `list`, `line`, `bar`) and its `display`
60
60
  sets that tile's options, each typed (`docs/react.md`, Lists, Numbers and Tables). A number
61
- takes `value` and `secondary` (which entry is large, and a second figure under it); a table
61
+ takes `value`, `secondary` and `full` (which entry is large, a second figure under it, and
62
+ the large value in full where a thousand or more is otherwise rounded to whole units); a table
62
63
  takes `bars`, `heat`, `compact` and `comparisons`. For example, `comparisons: { Discount:
63
64
  ["shown.coupon", "shown.plan"] }` opens the selected row by coupon, then by plan. Keys match
64
65
  raw group values exactly. Put free-text fields in the source’s `drill.prefer`. An option
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "derive-dashboards",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "Open-source embedded dashboards for your product: the server, the engine, React components, charts and the CLI, in one package.",
5
5
  "type": "module",
6
6
  "license": "MIT",