@rokkit/cli 1.6.0 → 1.7.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.
|
@@ -39,7 +39,8 @@ the vocabulary — cite it, don't restate it.
|
|
|
39
39
|
Colours/patterns/symbols come from `createChartPreset()` shared via `<ChartProvider>` (nest to
|
|
40
40
|
scope a subtree); named presets (`default`/`accessible`/`print`, or `helpers.presets`) go through
|
|
41
41
|
`spec.preset`. Adding a *new* colour/pattern/symbol means extending a registry
|
|
42
|
-
(
|
|
42
|
+
(`@rokkit/core` `categoricalPalette` / `patterns/patterns.js` `PATTERNS` /
|
|
43
|
+
`lib/brewing/marks/points.js`
|
|
43
44
|
`SYMBOL_NAMES`+`SYMBOL_TYPES`) then naming it in a preset — never inlining scattered raw colours.
|
|
44
45
|
- **Colour follows the theme.** Preset shades resolve per light/dark mode; a chart should reskin
|
|
45
46
|
from the preset/skin, not from hardcoded per-mark hex. Token-literal fills are fine when
|
|
@@ -81,7 +82,8 @@ results than blind grep. Fall back to Grep/Glob only if a tool errors or returns
|
|
|
81
82
|
root, `opacity=` on a chart, `stack\b` as a boolean prop, `palette=` / `preset=` on a chart,
|
|
82
83
|
raw `#[0-9a-fA-F]{3,8}`/`oklch(`/`rgb(` inside chart props. Map each hit to the correct
|
|
83
84
|
channel/preset fix.
|
|
84
|
-
4. If a new palette/pattern/symbol was added, verify it's in the right registry
|
|
85
|
+
4. If a new palette/pattern/symbol was added, verify it's in the right registry
|
|
86
|
+
(`categoricalPalette` /
|
|
85
87
|
`PATTERNS` / `SYMBOL_*`) with the right shape, and referenced by name in a preset. Run
|
|
86
88
|
`rokkit doctor` if available and fold in its advisories.
|
|
87
89
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rokkit/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Command line utilities for icon bundling and conversion.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@mdi/svg": "^7.4.47",
|
|
31
|
-
"@rokkit/unocss": "1.
|
|
31
|
+
"@rokkit/unocss": "1.7.0",
|
|
32
32
|
"sade": "^1.8.1",
|
|
33
33
|
"@iconify/tools": "^5.0.14",
|
|
34
34
|
"@iconify/types": "^2.0.0",
|
|
@@ -119,7 +119,8 @@ Every categorical encoding is driven by a **preset** (`packages/chart/src/lib/pr
|
|
|
119
119
|
|
|
120
120
|
Each list is **names into a registry**, cycled across your data's distinct values:
|
|
121
121
|
|
|
122
|
-
- `colors` → palette names in
|
|
122
|
+
- `colors` → palette names in **`@rokkit/core`'s `categoricalPalette`** (each name → 11 shades
|
|
123
|
+
`50–950`).
|
|
123
124
|
`assignColors(values, mode, preset)` picks `palette[name][shades[mode].fill|stroke]` — so a chart
|
|
124
125
|
re-colours correctly for light/dark automatically.
|
|
125
126
|
- `patterns` → names in **`patterns/patterns.js`** (`PATTERNS`, the SVG mark defs).
|
|
@@ -134,7 +135,7 @@ and share it via `ChartProvider`:
|
|
|
134
135
|
<script>
|
|
135
136
|
import { ChartProvider, createChartPreset, BarChart, LineChart } from '@rokkit/chart'
|
|
136
137
|
const preset = createChartPreset({
|
|
137
|
-
colors: ['teal', 'orange', 'rose'], // subset/reorder of
|
|
138
|
+
colors: ['teal', 'orange', 'rose'], // subset/reorder of categoricalPalette names
|
|
138
139
|
patterns: ['dots', 'hatch'],
|
|
139
140
|
shades: { dark: { fill: '400' } } // partial shade override (merges)
|
|
140
141
|
})
|
|
@@ -157,7 +158,8 @@ and share it via `ChartProvider`:
|
|
|
157
158
|
|
|
158
159
|
### Add a NEW colour palette
|
|
159
160
|
|
|
160
|
-
1. Add an 11-shade entry to `packages/
|
|
161
|
+
1. Add an 11-shade entry to `packages/core/src/colors/categorical.json` (shades `50`→`950`,
|
|
162
|
+
light→dark). It lives in core because `@rokkit/chart` and `@rokkit/graph` both consume it:
|
|
161
163
|
|
|
162
164
|
```json
|
|
163
165
|
"brand": { "50": "#f4f7ff", "100": "…", "300": "#93b4ff", "500": "#3b6cff",
|