@dashspec/renderer 0.1.3 → 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 +22 -1
- package/dist/{chunk-HB2WSKUI.js → chunk-2HHYJ5WX.js} +13 -4
- package/dist/chunk-2HHYJ5WX.js.map +1 -0
- package/dist/{core-uvLuoQ3X.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 +215 -88
- package/dist/index.js.map +1 -1
- package/dist/schema.json +5 -1
- package/docs/json-format.md +5 -3
- package/docs/widgets.md +1 -1
- package/package.json +1 -1
- package/dist/chunk-HB2WSKUI.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,26 @@ 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
|
+
|
|
17
37
|
## [0.1.3] - 2026-11-18
|
|
18
38
|
|
|
19
39
|
### Added
|
|
@@ -103,7 +123,8 @@ First public release.
|
|
|
103
123
|
never reach object prototypes, values inserted into Markdown are escaped, and custom
|
|
104
124
|
code runs in the sandbox by default. See [docs/security.md](docs/security.md).
|
|
105
125
|
|
|
106
|
-
[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
|
|
107
128
|
[0.1.3]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.2...v0.1.3
|
|
108
129
|
[0.1.2]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.1...v0.1.2
|
|
109
130
|
[0.1.1]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.0...v0.1.1
|
|
@@ -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. */
|
|
@@ -3275,6 +3283,7 @@ export {
|
|
|
3275
3283
|
plantDate,
|
|
3276
3284
|
createHelpers,
|
|
3277
3285
|
placeholders,
|
|
3286
|
+
stripStrings,
|
|
3278
3287
|
expressionReferences,
|
|
3279
3288
|
templateReferences,
|
|
3280
3289
|
collectReferences,
|
|
@@ -3379,4 +3388,4 @@ export {
|
|
|
3379
3388
|
RepeaterContract,
|
|
3380
3389
|
builtInWidgetChecks
|
|
3381
3390
|
};
|
|
3382
|
-
//# sourceMappingURL=chunk-
|
|
3391
|
+
//# sourceMappingURL=chunk-2HHYJ5WX.js.map
|