@lightdash/cli 2.272.2 → 2.273.0

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.
@@ -48,6 +48,31 @@ retain string bindings; details and examples live in the reusable-visualization
48
48
 
49
49
  This is for **layout and option iteration only**, and never fires in production (an embedded viz has a real host whose context always wins, and the param must be explicitly present). The fixture is fake data you hand-maintain: colors fall back to the palette (no model or shared-dashboard colors), `pivotDetails` must be shaped by hand, and formatting is whatever you type. **The explorer with real data remains the source of truth for correctness** — still run the upload → verify loop above before finishing, and verify every declared option actually changes the chart there.
50
50
 
51
+ ## Style with the Lightdash Library theme
52
+
53
+ The scaffold ships the **Lightdash Library theme** — `src/lightdash-library.css`
54
+ (imported by the starter; keep it first in the CSS chain) and the contract in
55
+ `references/lightdash-library-theme.md`. It makes a chart's chrome match
56
+ Lightdash's built-in charts, so installed chart types read as siblings of the
57
+ native ones. The rules that matter most:
58
+
59
+ - Style ALL chrome (axes, grids, legends, tooltips, typography) with the
60
+ `--ll-*` tokens; never hardcode chrome hexes. The tokens re-resolve under
61
+ the host's `.dark` class. SVG attributes can't resolve `var()`, so read
62
+ token values with `getComputedStyle` per render and call `useColorScheme()`
63
+ so the component re-renders on theme flips (the starter shows the pattern).
64
+ - Keep the canvas transparent (`html, body { background: transparent }`, set
65
+ by the theme css) — the host tile paints the surface.
66
+ - Series/data colors come from the instance palette, never the theme:
67
+ `resolveSeriesColor` / `resolveValueColor`, falling back to
68
+ `colorPalette[index % length]`. Two contract facts: the host sends
69
+ EFFECTIVE option values (declared defaults included), so a color option's
70
+ declared default is the only detectable "not overridden" state; and
71
+ `resolveValueColor`'s own fallback is palette-positional — semantic colors
72
+ (positive/negative) must check `context.valueColors` directly with semantic
73
+ hex fallbacks, never through the helper.
74
+ - Tooltips compose the `.ll-tooltip` utility classes from the theme css.
75
+
51
76
  ## Dependencies: template-deps-only, strictly
52
77
 
53
78
  Build with the template's preinstalled set (see `package.json` — React, Recharts, d3 and friends). Do not add npm packages and do not vendor library source into `src/`. This is stricter than for data apps: the official chart registry rejects any dependency drift from its template, so a chart type that grows custom dependencies becomes unpublishable.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lightdash/cli",
3
- "version": "2.272.2",
3
+ "version": "2.273.0",
4
4
  "description": "Lightdash CLI tool",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -22,8 +22,8 @@
22
22
  "@actions/core": "1.11.1",
23
23
  "@aws-sdk/credential-providers": "3.995.0",
24
24
  "@casl/ability": "6.8.0",
25
- "@lightdash/common": "2.272.2",
26
- "@lightdash/warehouses": "2.272.2",
25
+ "@lightdash/common": "2.273.0",
26
+ "@lightdash/warehouses": "2.273.0",
27
27
  "@sidvind/better-ajv-errors": "7.0.0",
28
28
  "@types/columnify": "1.5.1",
29
29
  "ajv": "8.18.0",