@dashspec/renderer 0.1.12 → 0.1.14

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.14] - 2026-11-18
18
+
19
+ ### Added
20
+
21
+ - Panel `style.variant`, and theme `widgets["Kind:variant"]`: style one panel of a kind differently
22
+ from the others (e.g. one compact table).
23
+ - Expression helper `first(list, field)`: the first item whose field is truthy.
24
+
25
+ ## [0.1.13] - 2026-11-18
26
+
27
+ ### Fixed
28
+
29
+ - A segmented Breakdown draws no sliver for a zero item (the legend still lists it), the bar takes
30
+ its container's full width, and legend dots keep their round shape.
31
+
17
32
  ## [0.1.12] - 2026-11-18
18
33
 
19
34
  ### Added
@@ -233,7 +248,9 @@ First public release.
233
248
  never reach object prototypes, values inserted into Markdown are escaped, and custom
234
249
  code runs in the sandbox by default. See [docs/security.md](docs/security.md).
235
250
 
236
- [Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.12...HEAD
251
+ [Unreleased]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.14...HEAD
252
+ [0.1.14]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.13...v0.1.14
253
+ [0.1.13]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.12...v0.1.13
237
254
  [0.1.12]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.11...v0.1.12
238
255
  [0.1.11]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.10...v0.1.11
239
256
  [0.1.10]: https://github.com/vaskar-nowpurchase/dashspec-renderer/compare/v0.1.9...v0.1.10
@@ -438,6 +438,8 @@ function createHelpers(t = {}) {
438
438
  max: (...v) => v.flat().map(num2).reduce((a, b) => Math.max(a, b), Number.NEGATIVE_INFINITY),
439
439
  sum: (list2, key) => Array.isArray(list2) ? list2.reduce((a, x) => a + num2(key ? x?.[key] : x) || a, 0) : 0,
440
440
  /** First item of `list` whose `key` equals `value`. */
441
+ /** The first item whose `key` is truthy (e.g. waiting > 0), or undefined. */
442
+ first: (list2, key) => Array.isArray(list2) ? list2.find((x) => x && typeof x === "object" && Boolean(x[key])) : void 0,
441
443
  lookup: (list2, key, value) => Array.isArray(list2) ? list2.find((x) => x && typeof x === "object" && x[key] === value) : void 0,
442
444
  join: (list2, sep = ",") => Array.isArray(list2) ? list2.join(sep) : list2 === null || list2 === void 0 ? "" : String(list2),
443
445
  lower: (v) => String(v ?? "").toLowerCase(),
@@ -1407,6 +1409,8 @@ var DataBinding = z7.union([
1407
1409
  ]);
1408
1410
  var PanelStyle = z7.object({
1409
1411
  tone: z7.enum(["default", "subtle", "accent", "plain"]).optional(),
1412
+ /** A name a theme can style this panel by: `theme.widgets["Table:compact"]` targets Tables with variant "compact". */
1413
+ variant: z7.string().regex(/^[A-Za-z][\w-]*$/).optional(),
1410
1414
  padding: z7.union([z7.enum(["none", "compact", "normal", "roomy"]), z7.number().int().min(0).max(64)]).optional(),
1411
1415
  hideHeader: z7.boolean().optional(),
1412
1416
  minHeight: z7.number().int().min(0).optional(),
@@ -1826,7 +1830,7 @@ function migrateDocument(input, widgets = []) {
1826
1830
  import { z as z10 } from "zod";
1827
1831
 
1828
1832
  // src/version.ts
1829
- var RENDERER_VERSION = "0.1.12";
1833
+ var RENDERER_VERSION = "0.1.14";
1830
1834
  var parse2 = (v) => {
1831
1835
  const m = /^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?(?:[-+].*)?$/.exec(v.trim());
1832
1836
  return m ? [Number(m[1]), Number(m[2] ?? 0), Number(m[3] ?? 0)] : void 0;
@@ -3485,4 +3489,4 @@ export {
3485
3489
  RepeaterContract,
3486
3490
  builtInWidgetChecks
3487
3491
  };
3488
- //# sourceMappingURL=chunk-2Y6SJ7MU.js.map
3492
+ //# sourceMappingURL=chunk-LPALJPKV.js.map