@dashspec/renderer 0.1.11 → 0.1.12

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,21 @@ under the new version.
14
14
 
15
15
  ## [Unreleased]
16
16
 
17
+ ## [0.1.12] - 2026-11-18
18
+
19
+ ### Added
20
+
21
+ - Breakdown `items`: fixed `{ label, value, tone }` items (values can be templates) instead of data
22
+ rows; `label` / `value` default to "label" / "value".
23
+ - Tiles `stretch: false`: a few tiles keep their column width instead of stretching across the row.
24
+
25
+ ### Fixed
26
+
27
+ - A `fit` card also shrinks when its content does (it measured its stretched height before, so it
28
+ kept blank space after, e.g., a filter change left fewer tiles).
29
+ - A panel loads every datasource its templates read (title, `meta`, Breakdown `items`…), not only
30
+ the one it binds with `data`.
31
+
17
32
  ## [0.1.11] - 2026-11-18
18
33
 
19
34
  ### Added
@@ -218,7 +233,8 @@ First public release.
218
233
  never reach object prototypes, values inserted into Markdown are escaped, and custom
219
234
  code runs in the sandbox by default. See [docs/security.md](docs/security.md).
220
235
 
221
- [Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.11...HEAD
236
+ [Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.12...HEAD
237
+ [0.1.12]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.11...v0.1.12
222
238
  [0.1.11]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.10...v0.1.11
223
239
  [0.1.10]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.9...v0.1.10
224
240
  [0.1.9]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.8...v0.1.9
@@ -1826,7 +1826,7 @@ function migrateDocument(input, widgets = []) {
1826
1826
  import { z as z10 } from "zod";
1827
1827
 
1828
1828
  // src/version.ts
1829
- var RENDERER_VERSION = "0.1.11";
1829
+ var RENDERER_VERSION = "0.1.12";
1830
1830
  var parse2 = (v) => {
1831
1831
  const m = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:[-+].*)?$/.exec(v.trim());
1832
1832
  return m ? [Number(m[1]), Number(m[2] ?? 0), Number(m[3] ?? 0)] : void 0;
@@ -2613,8 +2613,20 @@ var BreakdownContract = {
2613
2613
  version: 1,
2614
2614
  schema: z13.object({
2615
2615
  ...Common2,
2616
- label: z13.string(),
2617
- value: z13.string(),
2616
+ /** Fields for the label and value of each data row (default "label" / "value"). */
2617
+ label: z13.string().default("label"),
2618
+ value: z13.string().default("value"),
2619
+ /**
2620
+ * Fixed items instead of data rows: `{ label, value, tone? }`, where `value` can be a template, e.g.
2621
+ * { "label": "Rejected", "value": "${datasources.q.data.overall.rejected}", "tone": "bad" }.
2622
+ */
2623
+ items: z13.array(
2624
+ z13.object({
2625
+ label: z13.string(),
2626
+ value: z13.union([z13.number(), z13.string()]),
2627
+ tone: z13.enum(["good", "warn", "bad", "info", "neutral"]).optional()
2628
+ }).strict()
2629
+ ).optional(),
2618
2630
  mode: z13.enum(["meters", "segmented", "donut"]).default("meters"),
2619
2631
  /** Adds a remainder item up to `total`, e.g. "Unaccounted". */
2620
2632
  remainder: z13.object({ label: z13.string(), total: z13.union([z13.number(), z13.string()]) }).strict().optional(),
@@ -3011,6 +3023,8 @@ var TilesContract = {
3011
3023
  columns: z26.number().int().min(1).max(12).optional(),
3012
3024
  /** Narrowest a tile gets, in px, before the row wraps (or scrolls when wrap is off). */
3013
3025
  minTileWidth: z26.number().int().min(60).max(600).default(128),
3026
+ /** Few tiles stretch to fill the row (default). false: tiles keep their column width (`columns`). */
3027
+ stretch: z26.boolean().default(true),
3014
3028
  /** Wrap onto new lines when the row is full; off = one row that scrolls sideways. */
3015
3029
  wrap: z26.boolean().default(true),
3016
3030
  /** Tags under the caption: `{ text, tone, when }` over the tile's `row`. */
@@ -3471,4 +3485,4 @@ export {
3471
3485
  RepeaterContract,
3472
3486
  builtInWidgetChecks
3473
3487
  };
3474
- //# sourceMappingURL=chunk-RSIUW5J4.js.map
3488
+ //# sourceMappingURL=chunk-2Y6SJ7MU.js.map