@dashspec/renderer 0.1.13 → 0.1.15
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 +23 -1
- package/dist/{chunk-42YQDK6L.js → chunk-WRLIWT7F.js} +7 -2
- package/dist/chunk-WRLIWT7F.js.map +1 -0
- package/dist/{core-C6GFuH_O.d.ts → core-CLhuHvGm.d.ts} +72 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.js +17 -7
- package/dist/index.js.map +1 -1
- package/dist/schema.json +4 -0
- package/docs/data.md +1 -0
- package/docs/theming.md +2 -1
- package/package.json +1 -1
- package/dist/chunk-42YQDK6L.js.map +0 -1
package/dist/schema.json
CHANGED
package/docs/data.md
CHANGED
|
@@ -493,6 +493,7 @@ Reading a member of `null` or `undefined` gives `undefined` instead of an error.
|
|
|
493
493
|
| `today()` | Today's date, `YYYY-MM-DD` |
|
|
494
494
|
| `includesToday(range)` | Whether a `{ from, to }` range contains today |
|
|
495
495
|
| `granularityFor(range)` | `"heat"` (≤ 1 day), `"day"` (≤ 31), `"week"` (≤ 92), `"month"` (≤ 730) or `"year"` |
|
|
496
|
+
| `first(list, field)` | The first item whose `field` is truthy, e.g. `first(stages, 'waiting').name` |
|
|
496
497
|
| `fmt.number(v, decimals?)` | `1,234.5` in the dashboard's locale |
|
|
497
498
|
| `fmt.compact(v)` | `12.3K` |
|
|
498
499
|
| `fmt.percent(v, decimals = 0)` | `42.5%` (`v` is already a percentage) |
|
package/docs/theming.md
CHANGED
|
@@ -120,7 +120,8 @@ const theme = createTheme({
|
|
|
120
120
|
});
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
Each panel carries `data-kind="<kind>"`, which is what these rules target.
|
|
123
|
+
Each panel carries `data-kind="<kind>"`, which is what these rules target. A key `"Kind:variant"`
|
|
124
|
+
styles only panels of that kind whose `style.variant` is that name, so two tables can look different. Your own widget
|
|
124
125
|
(registered with `widgets` on the provider or renderer) reads its entry with
|
|
125
126
|
`useThemeTokens()?.theme.widgets?.["acme.Gauge"]`. Variable names must look like `--name`; values
|
|
126
127
|
with `;`, braces or `<>` are dropped, and `css` may not contain a `<style>` tag.
|