dashtaste 0.0.4 → 0.0.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/dist/cli.js CHANGED
@@ -4,7 +4,8 @@ import { check, summarize, score } from './engine.js';
4
4
  import { rules } from './rules/index.js';
5
5
  import { getTokens } from './packs/index.js';
6
6
  import { extractPage } from './extract.js';
7
- const version = '0.0.1';
7
+ import { createRequire } from 'node:module';
8
+ const version = createRequire(import.meta.url)('../package.json').version;
8
9
  const help = {
9
10
  main: 'Usage: dashtaste <check|rules|tokens> --help',
10
11
  check: 'Usage: dashtaste check <file|url...> [--pack global|cn] [--mode light|dark] [--format text|json] [--max-warnings N] [--disable DT001,...] [--only DT001,...] [--background #hex]\nCheck options, option arrays, or page facts. Exit: 0 pass, 1 findings exceed limit, 2 invalid input. Set NO_COLOR to disable ANSI colour; CHROME_PATH selects the browser.',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dashtaste",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Dashboard taste for coding agents: two style-pack skills (global and cn) plus a dashtaste check linter for ECharts configs and rendered dashboards.",
5
5
  "keywords": [
6
6
  "dashboard",
@@ -22,16 +22,18 @@ For a global audience use dashtaste-global.
22
22
  ## Ten rules to apply first
23
23
 
24
24
  - DT001: Set explicit series colours from the selected pack.
25
- - DT002: Keep at most five categorical colours; group the tail as Other.
25
+ - DT002: Stay within six categorical colours and five saturated hue buckets; group the tail as Other.
26
26
  - DT003: Draw straight line segments; smoothing invents intermediate values.
27
- - DT004: Hide line symbols above 12 points.
28
- - DT005: Use ranked bars for shares; no donuts in KPI boards.
27
+ - DT004: Use small dots only on short series (at most 31 points, 5px); otherwise hide symbols.
28
+ - DT005: Cap pie slices at five (eight for cn rose charts); prefer bars or Other for the rest.
29
29
  - DT007: Use flat two-dimensional marks.
30
30
  - DT009: Put units in value-axis names.
31
31
  - DT010: Start bar value axes at zero and disable scale.
32
32
  - DT013: Use red-up and green-down deltas throughout the page.
33
33
  - DT015: Meet 4.5:1 text contrast, or 3:1 for large text.
34
34
 
35
+ Prefer horizontal bars for shares on KPI boards; keep donut radius ratio at most 0.75 (DT006).
36
+
35
37
  ## Layout explains itself
36
38
 
37
39
  Use no helper labels, explanatory captions, or “this chart shows” text.
@@ -22,16 +22,18 @@ For a Chinese-market audience use dashtaste-cn.
22
22
  ## Ten rules to apply first
23
23
 
24
24
  - DT001: Set explicit series colours from the selected pack.
25
- - DT002: Keep at most five categorical colours; group the tail as Other.
25
+ - DT002: Stay within six categorical colours and five saturated hue buckets; group the tail as Other.
26
26
  - DT003: Draw straight line segments; smoothing invents intermediate values.
27
- - DT004: Hide line symbols above 12 points.
28
- - DT005: Use ranked bars for shares; no donuts in KPI boards.
27
+ - DT004: Use small dots only on short series (at most 31 points, 5px); otherwise hide symbols.
28
+ - DT005: Cap pie slices at five (eight for cn rose charts); prefer bars or Other for the rest.
29
29
  - DT007: Use flat two-dimensional marks.
30
30
  - DT009: Put units in value-axis names.
31
31
  - DT010: Start bar value axes at zero and disable scale.
32
32
  - DT013: Use green for improvement and red for deterioration; set lower-is-better polarity for churn and expenses.
33
33
  - DT015: Meet 4.5:1 text contrast, or 3:1 for large text.
34
34
 
35
+ Prefer horizontal bars for shares on KPI boards; keep donut radius ratio at most 0.75 (DT006).
36
+
35
37
  ## Layout explains itself
36
38
 
37
39
  Use no helper labels, explanatory captions, or “this chart shows” text.