Commit 7385295
feat: add colorSpace as canonical name, deprecate colorspace (non-breaking) (#264)
* feat: add colorSpace as canonical name, deprecate colorspace (non-breaking)
- Accept both colorspace and colorSpace in Color/Theme/createScale; prefer colorSpace
- Add colorSpace getter/setter; keep colorspace as deprecated alias with console.warn
- Theme.updateColor accepts param.colorSpace ?? param.colorspace
- TypeScript: add colorSpace to types, @deprecated colorspace
- docs/ui: use colorSpace in config, URL serialization, and internal classes
- URL config parsing supports both keys for backward compatibility
Refs #190, supersedes approach in PR #191 (deprecation alias avoids breaking change).
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: add changeset for colorSpace deprecation alias
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: remove duplicate formulaString/largeText/smallText in createOutputParameters.js
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(contrast-colors): improve TS return types and add type tests
- Fix convertColorValue return type: overloads for object=true
(Record<string, number>) vs default (string)
- Fix createScale return type: overloads for asFun=true (Scale) vs
default (CssColor[])
- Export consumer-facing types: CssColor, Colorspace, CreateScaleOptions,
etc.
- Add chroma-js.d.ts shim for type-checking without @types/chroma-js
- Add tsd and test/index.test-d.ts to lock return types and prevent
regressions
- Add moon test-types task for CI
Co-authored-by: Cursor <cursoragent@cursor.com>
* ci: do not fail job when run-report action has bad credentials
Use continue-on-error for moonrepo/run-report-action so missing or
invalid MOON_GH_TOKEN (e.g. on fork PRs) does not mark the job failed.
Co-authored-by: Cursor <cursoragent@cursor.com>
* ci: capture moon ci log on failure and use GITHUB_TOKEN
- Run moon ci with tee to save full output to moon-ci.log
- Upload moon-ci.log artifact when job fails for debugging
- Use GITHUB_TOKEN for run-report-action instead of MOON_GH_TOKEN
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix(ci): ensure deps install before moon ci; fix moon task inputs/outputs
- CI: use GITHUB_TOKEN, run pnpm install --frozen-lockfile before moon ci,
upload moon-ci.log on failure, continue-on-error for run-report
- Moon: use @group() instead of @globs() for task inputs/outputs so
contrast-colors literal sources are hashed and cache invalidates correctly
Co-authored-by: Cursor <cursoragent@cursor.com>
* chore: update lockfile after removing @types/chroma-js from contrast-colors
Co-authored-by: Cursor <cursoragent@cursor.com>
* fix: colorSpace deprecation bugs
- Use colorSpace (not colorspace) in Color._generateColorScale to avoid
spamming deprecation warning on every scale regeneration
- Use colorSpaceVal in params.js OKLAB/OKLCH smoothing check so URL
configs with old colorspace key still enable first-color smoothing
- Add console.warn in theme.js updateColor when deprecated colorspace
key is used (consistent with Color constructor/setter)
- Fix Output error message to reference this._output not colorSpace
Co-authored-by: Cursor <cursoragent@cursor.com>
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent c9060b5 commit 7385295
26 files changed
Lines changed: 653 additions & 121 deletions
File tree
- .changeset
- .github/workflows
- docs/ui
- src
- js
- packages/contrast-colors
- lib
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
| 23 | + | |
17 | 24 | | |
18 | | - | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
307 | 307 | | |
308 | 308 | | |
309 | 309 | | |
310 | | - | |
| 310 | + | |
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
| 139 | + | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
125 | | - | |
| 124 | + | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | 128 | | |
133 | 129 | | |
134 | 130 | | |
| |||
0 commit comments