@dashspec/renderer 0.1.2 → 0.1.4
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/CHANGELOG.md +30 -1
- package/dist/{chunk-T4QLZXX4.js → chunk-2HHYJ5WX.js} +24 -5
- package/dist/chunk-2HHYJ5WX.js.map +1 -0
- package/dist/{core-CIcJ1KNt.d.ts → core-DIU9lTws.d.ts} +81 -23
- package/dist/core.d.ts +1 -1
- package/dist/core.js +3 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +219 -89
- package/dist/index.js.map +1 -1
- package/dist/schema.json +5 -1
- package/docs/json-format.md +5 -3
- package/docs/widgets.md +2 -2
- package/package.json +1 -1
- package/dist/chunk-T4QLZXX4.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,33 @@ under the new version.
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.1.4] - 2026-11-18
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- `display.filterBar.look: "segmented"`: the icon and the filters share one track, each filter a
|
|
22
|
+
borderless chip, all from theme tokens.
|
|
23
|
+
- `fit: true` on a layout item: the card grows taller than `h` when its content needs it (tiles
|
|
24
|
+
that wrap, a table with more rows), so it never scrolls; `h` stays the minimum.
|
|
25
|
+
- Kpi `empty`: show the empty state (`emptyText`) even though there is a value, e.g. when the API
|
|
26
|
+
sends 0 together with a "nothing yet" message.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- The select between a stepper's arrows no longer draws a square border and ring inside the
|
|
31
|
+
rounded group when open or clicked; keyboard focus shows an inset ring.
|
|
32
|
+
- The ⓘ tooltip is no longer clipped by its card: it is drawn above the icon (below when there is
|
|
33
|
+
no room) with an arrow and left-aligned text, in the theme's tooltip colours.
|
|
34
|
+
- A template whose quoted text contains `avg`, `row` or `item` (e.g. a title "… avg per day …")
|
|
35
|
+
is filled again instead of being shown raw.
|
|
36
|
+
|
|
37
|
+
## [0.1.3] - 2026-11-18
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- `valueAxis` on BarChart and LineChart: `min`, `max`, `atLeast` (the top is at least this and
|
|
42
|
+
grows when a value is higher, so drill-down levels share one scale) and `step` between ticks.
|
|
43
|
+
|
|
17
44
|
## [0.1.2] - 2026-11-18
|
|
18
45
|
|
|
19
46
|
### Fixed
|
|
@@ -96,7 +123,9 @@ First public release.
|
|
|
96
123
|
never reach object prototypes, values inserted into Markdown are escaped, and custom
|
|
97
124
|
code runs in the sandbox by default. See [docs/security.md](docs/security.md).
|
|
98
125
|
|
|
99
|
-
[Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.
|
|
126
|
+
[Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.4...HEAD
|
|
127
|
+
[0.1.4]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.3...v0.1.4
|
|
128
|
+
[0.1.3]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.2...v0.1.3
|
|
100
129
|
[0.1.2]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.1...v0.1.2
|
|
101
130
|
[0.1.1]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.0...v0.1.1
|
|
102
131
|
[0.1.0]: https://github.com/vaskar-nowpurchase/dashspec-renderer/releases/tag/v0.1.0
|
|
@@ -1242,7 +1242,9 @@ var LayoutItem = z5.object({
|
|
|
1242
1242
|
w: z5.number().int().min(1),
|
|
1243
1243
|
h: z5.number().int().min(1),
|
|
1244
1244
|
minW: z5.number().int().min(1).optional(),
|
|
1245
|
-
minH: z5.number().int().min(1).optional()
|
|
1245
|
+
minH: z5.number().int().min(1).optional(),
|
|
1246
|
+
/** Grow taller than `h` when the content needs it, so the card never scrolls; `h` stays the minimum. */
|
|
1247
|
+
fit: z5.boolean().optional()
|
|
1246
1248
|
}).strict();
|
|
1247
1249
|
var BREAKPOINTS = ["desktop", "tablet", "mobile", "tv"];
|
|
1248
1250
|
var Layout = z5.object({
|
|
@@ -1467,7 +1469,8 @@ var Display = z9.object({
|
|
|
1467
1469
|
/** The icon at the start of the bar. */
|
|
1468
1470
|
icon: z9.enum(["sliders", "filter", "calendar", "search", "none"]).default("sliders"),
|
|
1469
1471
|
/** "card" (default) or "plain" (no background). */
|
|
1470
|
-
|
|
1472
|
+
/** "segmented": the filters sit together in one track as borderless chips. */
|
|
1473
|
+
look: z9.enum(["card", "plain", "segmented"]).default("card")
|
|
1471
1474
|
}).strict().optional(),
|
|
1472
1475
|
syncedLabel: Template.optional(),
|
|
1473
1476
|
tv: z9.object({ rotateViews: z9.array(Id).optional(), every: Duration.optional(), hideToolbar: z9.boolean().optional() }).strict().optional()
|
|
@@ -1805,7 +1808,7 @@ function migrateDocument(input, widgets = []) {
|
|
|
1805
1808
|
import { z as z10 } from "zod";
|
|
1806
1809
|
|
|
1807
1810
|
// src/version.ts
|
|
1808
|
-
var RENDERER_VERSION = "0.1.
|
|
1811
|
+
var RENDERER_VERSION = "0.1.4";
|
|
1809
1812
|
var parse2 = (v) => {
|
|
1810
1813
|
const m = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:[-+].*)?$/.exec(v.trim());
|
|
1811
1814
|
return m ? [Number(m[1]), Number(m[2] ?? 0), Number(m[3] ?? 0)] : void 0;
|
|
@@ -2752,6 +2755,11 @@ var KpiContract = {
|
|
|
2752
2755
|
targetMissing: z20.string().default("Target un-defined"),
|
|
2753
2756
|
/** Text instead of the value when there is none, e.g. "No heats tapped yet today". */
|
|
2754
2757
|
emptyText: z20.string().optional(),
|
|
2758
|
+
/**
|
|
2759
|
+
* Show the empty state (emptyText) even though there is a value, e.g. when the API sends 0 with a "nothing
|
|
2760
|
+
* yet" message: `"${datasources.x.data.kpi.empty_text != null}"`.
|
|
2761
|
+
*/
|
|
2762
|
+
empty: z20.boolean().optional(),
|
|
2755
2763
|
/** A data-quality note under the value, e.g. "2 heats without kWh reading". */
|
|
2756
2764
|
note: z20.string().optional(),
|
|
2757
2765
|
/** Previous value: a number, a path, or { path, label } — shows ▲/▼ with the change. */
|
|
@@ -3074,7 +3082,17 @@ var cartesianProps = {
|
|
|
3074
3082
|
decimals: z28.number().int().min(0).max(6).optional(),
|
|
3075
3083
|
/** A number, or a path in the datasource result. */
|
|
3076
3084
|
target: z28.union([z28.number(), z28.string()]).optional(),
|
|
3077
|
-
targetLabel: z28.string().optional()
|
|
3085
|
+
targetLabel: z28.string().optional(),
|
|
3086
|
+
/**
|
|
3087
|
+
* The value axis: fixed `min` / `max`, `atLeast` (the top is at least this and grows when a value is higher, so
|
|
3088
|
+
* every drill level shares one scale), and `step` between ticks.
|
|
3089
|
+
*/
|
|
3090
|
+
valueAxis: z28.object({
|
|
3091
|
+
min: z28.number().optional(),
|
|
3092
|
+
max: z28.number().optional(),
|
|
3093
|
+
atLeast: z28.number().optional(),
|
|
3094
|
+
step: z28.number().positive().optional()
|
|
3095
|
+
}).strict().optional()
|
|
3078
3096
|
};
|
|
3079
3097
|
var BarChartContract = {
|
|
3080
3098
|
kind: "BarChart",
|
|
@@ -3265,6 +3283,7 @@ export {
|
|
|
3265
3283
|
plantDate,
|
|
3266
3284
|
createHelpers,
|
|
3267
3285
|
placeholders,
|
|
3286
|
+
stripStrings,
|
|
3268
3287
|
expressionReferences,
|
|
3269
3288
|
templateReferences,
|
|
3270
3289
|
collectReferences,
|
|
@@ -3369,4 +3388,4 @@ export {
|
|
|
3369
3388
|
RepeaterContract,
|
|
3370
3389
|
builtInWidgetChecks
|
|
3371
3390
|
};
|
|
3372
|
-
//# sourceMappingURL=chunk-
|
|
3391
|
+
//# sourceMappingURL=chunk-2HHYJ5WX.js.map
|