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.
- package/README.md +1 -1
- package/dist/charts/kinds/area-marks.mjs +20 -19
- package/dist/charts/kinds/grid-marks.mjs +8 -10
- package/dist/charts/kinds/grid-words.mjs +1 -1
- package/dist/charts/kinds/grid.d.mts +1 -1
- package/dist/charts/kinds/grid.mjs +3 -2
- package/dist/charts/marks/axes.mjs +2 -1
- package/dist/charts/marks/x-axis.mjs +3 -2
- package/dist/charts/scene/types.d.mts +1 -1
- package/dist/charts/theme.d.mts +25 -25
- package/dist/charts/theme.mjs +35 -27
- package/dist/charts-react/plan-grid.mjs +1 -1
- package/dist/core/document/display.d.mts +1 -0
- package/dist/core/document/display.mjs +3 -1
- package/dist/core/engine/version.d.mts +1 -1
- package/dist/core/engine/version.mjs +1 -1
- package/dist/core/time/bucket.d.mts +2 -1
- package/dist/core/time/bucket.mjs +6 -2
- package/dist/core/time/zone.d.mts +6 -1
- package/dist/core/time/zone.mjs +11 -2
- package/dist/llms.txt +1 -1
- package/dist/react/Canvas.mjs +7 -7
- package/dist/react/Dashboard.d.mts +6 -0
- package/dist/react/Dashboard.mjs +1 -0
- package/dist/react/Header.mjs +21 -17
- package/dist/react/builder/Time.mjs +1 -1
- package/dist/react/builder/words.d.mts +2 -1
- package/dist/react/builder/words.mjs +1 -1
- package/dist/react/columns.mjs +9 -1
- package/dist/react/drill/board.mjs +1 -0
- package/dist/react/drill/props.d.mts +2 -1
- package/dist/react/drill/props.mjs +8 -5
- package/dist/react/english.mjs +6 -6
- package/dist/react/format.d.mts +1 -1
- package/dist/react/format.mjs +25 -6
- package/dist/react/headline.d.mts +9 -0
- package/dist/react/headline.mjs +51 -0
- package/dist/react/index.d.mts +3 -2
- package/dist/react/index.mjs +4 -3
- package/dist/react/messages.d.mts +1 -0
- package/dist/react/place.mjs +4 -2
- package/dist/react/renderers/index.mjs +31 -8
- package/dist/react/theme-unlayered.css +1 -1
- package/dist/react/theme.css +1 -1
- package/dist/recharts/bar.mjs +2 -2
- package/dist/recharts/line.mjs +2 -2
- package/dist/recharts/parts.mjs +3 -1
- package/dist/skills/derive-dashboards/SKILL.md +3 -2
- package/package.json +1 -1
package/dist/recharts/bar.mjs
CHANGED
|
@@ -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:
|
|
126
|
+
stroke: GRID,
|
|
127
127
|
vertical: !overTime,
|
|
128
128
|
horizontal: overTime
|
|
129
129
|
}),
|
package/dist/recharts/line.mjs
CHANGED
|
@@ -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:
|
|
70
|
+
stroke: GRID,
|
|
71
71
|
vertical: false
|
|
72
72
|
}),
|
|
73
73
|
/* @__PURE__ */ jsx(XAxis, {
|
package/dist/recharts/parts.mjs
CHANGED
|
@@ -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,
|
|
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 `
|
|
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