@dashspec/renderer 0.1.3 → 0.1.5

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 CHANGED
@@ -14,6 +14,45 @@ under the new version.
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.1.5] - 2026-11-18
18
+
19
+ ### Added
20
+
21
+ - Table `maxHeight`: rows grow up to this many px, then scroll (in a `fit` card they otherwise
22
+ set the card's height).
23
+ - Kpi `unitStyle: "value"`: the unit in the number's own type ("93.9%").
24
+ - Theme `scale.chip` (`radius`, `border`, `weight`, `paddingX`, `height`, `fontSize`) for status
25
+ chips; the defaults are the existing look.
26
+
27
+ ### Changed
28
+
29
+ - `fit` cards that start on the same grid row grow together, so a row keeps one height, and a
30
+ KPI's target chip stays at the bottom of a taller card.
31
+
32
+ ### Fixed
33
+
34
+ - A KPI's number turns the action colour on hover only when the panel has an `on.click` handler.
35
+
36
+ ## [0.1.4] - 2026-11-18
37
+
38
+ ### Added
39
+
40
+ - `display.filterBar.look: "segmented"`: the icon and the filters share one track, each filter a
41
+ borderless chip, all from theme tokens.
42
+ - `fit: true` on a layout item: the card grows taller than `h` when its content needs it (tiles
43
+ that wrap, a table with more rows), so it never scrolls; `h` stays the minimum.
44
+ - Kpi `empty`: show the empty state (`emptyText`) even though there is a value, e.g. when the API
45
+ sends 0 together with a "nothing yet" message.
46
+
47
+ ### Fixed
48
+
49
+ - The select between a stepper's arrows no longer draws a square border and ring inside the
50
+ rounded group when open or clicked; keyboard focus shows an inset ring.
51
+ - The ⓘ tooltip is no longer clipped by its card: it is drawn above the icon (below when there is
52
+ no room) with an arrow and left-aligned text, in the theme's tooltip colours.
53
+ - A template whose quoted text contains `avg`, `row` or `item` (e.g. a title "… avg per day …")
54
+ is filled again instead of being shown raw.
55
+
17
56
  ## [0.1.3] - 2026-11-18
18
57
 
19
58
  ### Added
@@ -103,7 +142,9 @@ First public release.
103
142
  never reach object prototypes, values inserted into Markdown are escaped, and custom
104
143
  code runs in the sandbox by default. See [docs/security.md](docs/security.md).
105
144
 
106
- [Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.3...HEAD
145
+ [Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.5...HEAD
146
+ [0.1.5]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.4...v0.1.5
147
+ [0.1.4]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.3...v0.1.4
107
148
  [0.1.3]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.2...v0.1.3
108
149
  [0.1.2]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.1...v0.1.2
109
150
  [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
- look: z9.enum(["card", "plain"]).default("card")
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.3";
1811
+ var RENDERER_VERSION = "0.1.5";
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;
@@ -2736,6 +2739,8 @@ var KpiContract = {
2736
2739
  schema: z20.object({
2737
2740
  ...Common2,
2738
2741
  unit: z20.string().optional(),
2742
+ /** "small" (default): the unit in small text after the number; "value": in the number's own type ("93.9%"). */
2743
+ unitStyle: z20.enum(["small", "value"]).default("small"),
2739
2744
  format: Format.optional(),
2740
2745
  decimals: z20.number().int().min(0).max(6).optional(),
2741
2746
  /** Target or plan: a number, or a path in the datasource result. Shown in the footer and used for the status chip. */
@@ -2752,6 +2757,11 @@ var KpiContract = {
2752
2757
  targetMissing: z20.string().default("Target un-defined"),
2753
2758
  /** Text instead of the value when there is none, e.g. "No heats tapped yet today". */
2754
2759
  emptyText: z20.string().optional(),
2760
+ /**
2761
+ * Show the empty state (emptyText) even though there is a value, e.g. when the API sends 0 with a "nothing
2762
+ * yet" message: `"${datasources.x.data.kpi.empty_text != null}"`.
2763
+ */
2764
+ empty: z20.boolean().optional(),
2755
2765
  /** A data-quality note under the value, e.g. "2 heats without kWh reading". */
2756
2766
  note: z20.string().optional(),
2757
2767
  /** Previous value: a number, a path, or { path, label } — shows ▲/▼ with the change. */
@@ -2869,6 +2879,8 @@ var Agg = z25.enum(["sum", "avg", "min", "max", "count"]);
2869
2879
  var schema = z25.object({
2870
2880
  ...Common2,
2871
2881
  columns: z25.array(Column).optional(),
2882
+ /** Tallest the rows get, in px; past it they scroll. Default: the card's height. */
2883
+ maxHeight: z25.number().int().min(60).optional(),
2872
2884
  /** Columns from the data: a path in the datasource result to a list of { key, label }. */
2873
2885
  columnsFrom: z25.object({
2874
2886
  path: z25.string(),
@@ -3275,6 +3287,7 @@ export {
3275
3287
  plantDate,
3276
3288
  createHelpers,
3277
3289
  placeholders,
3290
+ stripStrings,
3278
3291
  expressionReferences,
3279
3292
  templateReferences,
3280
3293
  collectReferences,
@@ -3379,4 +3392,4 @@ export {
3379
3392
  RepeaterContract,
3380
3393
  builtInWidgetChecks
3381
3394
  };
3382
- //# sourceMappingURL=chunk-HB2WSKUI.js.map
3395
+ //# sourceMappingURL=chunk-7J6WHLG6.js.map