Skip to content

Commit 9a0906d

Browse files
committed
feat: officially support Angular v22 & run compat tests
1 parent 00fdbf3 commit 9a0906d

23 files changed

Lines changed: 1987 additions & 17 deletions

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
22

33
# Compiled output
4-
/dist
4+
dist
55
/tmp
66
/out-tsc
77
/bazel-out
88

99
# Node
10-
/node_modules
10+
node_modules
1111
npm-debug.log
1212
yarn-error.log
1313

@@ -30,7 +30,7 @@ yarn-error.log
3030
.history/*
3131

3232
# Miscellaneous
33-
/.angular/cache
33+
**/.angular/cache
3434
.sass-cache/
3535
/connect.lock
3636
/coverage

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ Full installation, setup, API reference, and theming notes:
3737
## Development
3838

3939
```bash
40-
pnpm test
40+
pnpm test # Run all tests
41+
pnpm test:compat # Run Angular version compatibility tests
4142
pnpm lint
4243
pnpm format
4344
```

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"test": "pnpm run /^test:/",
1313
"test:lib": "ng test lib",
1414
"test:demo": "ng test demo",
15+
"test:compat-build": "pnpm -r run build",
16+
"test:compat-test": "pnpm -r run test",
1517
"lint": "oxlint",
1618
"format": "oxfmt",
1719
"format:check": "oxfmt --check",
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
diff --git a/dynamiccolor/color_spec_2025.js b/dynamiccolor/color_spec_2025.js
2+
index 8bef961c7c6127c028b98ee3305270be5247a0c2..271597946422c58b91a54c1e1a748d30350ac015 100644
3+
--- a/dynamiccolor/color_spec_2025.js
4+
+++ b/dynamiccolor/color_spec_2025.js
5+
@@ -18,7 +18,7 @@ import { Hct } from '../hct/hct.js';
6+
import * as math from '../utils/math_utils.js';
7+
import { ColorSpecDelegateImpl2021 } from './color_spec_2021.js';
8+
import { ContrastCurve } from './contrast_curve.js';
9+
-import { DynamicColor, extendSpecVersion } from './dynamic_color';
10+
+import { DynamicColor, extendSpecVersion } from './dynamic_color.js';
11+
import { ToneDeltaPair } from './tone_delta_pair.js';
12+
import { Variant } from './variant.js';
13+
/**
14+
diff --git a/scheme/scheme_content.js b/scheme/scheme_content.js
15+
index e06c67bc68883b4a5210dc4241544ed79dec905c..0b8f5bcd687d09df6f95931aad453829277f7c57 100644
16+
--- a/scheme/scheme_content.js
17+
+++ b/scheme/scheme_content.js
18+
@@ -14,7 +14,7 @@
19+
* See the License for the specific language governing permissions and
20+
* limitations under the License.
21+
*/
22+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
23+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
24+
import { Variant } from '../dynamiccolor/variant.js';
25+
/**
26+
* A scheme that places the source color in `Scheme.primaryContainer`.
27+
diff --git a/scheme/scheme_expressive.js b/scheme/scheme_expressive.js
28+
index 43d05c6a9989566f2f300e8bf01fa4f1a8e120f0..78bc8b4ff210ee6b43e40c1875c080ad0a785fa5 100644
29+
--- a/scheme/scheme_expressive.js
30+
+++ b/scheme/scheme_expressive.js
31+
@@ -14,7 +14,7 @@
32+
* See the License for the specific language governing permissions and
33+
* limitations under the License.
34+
*/
35+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
36+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
37+
import { Variant } from '../dynamiccolor/variant.js';
38+
/**
39+
* A Dynamic Color theme that is intentionally detached from the source color.
40+
diff --git a/scheme/scheme_fidelity.js b/scheme/scheme_fidelity.js
41+
index a7461cdd4b49a49e642cd1060fba95ea1b6c7a1e..da51d7b37fd920e14c6f9a66f9173b661f012a1f 100644
42+
--- a/scheme/scheme_fidelity.js
43+
+++ b/scheme/scheme_fidelity.js
44+
@@ -14,7 +14,7 @@
45+
* See the License for the specific language governing permissions and
46+
* limitations under the License.
47+
*/
48+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
49+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
50+
import { Variant } from '../dynamiccolor/variant.js';
51+
/**
52+
* A scheme that places the source color in `Scheme.primaryContainer`.
53+
diff --git a/scheme/scheme_fruit_salad.js b/scheme/scheme_fruit_salad.js
54+
index 87443afa8bb09d9c6f67be12fde55b7db9b9f37a..bbf93cc30472a18a2a27cd3527a20e9aecf83244 100644
55+
--- a/scheme/scheme_fruit_salad.js
56+
+++ b/scheme/scheme_fruit_salad.js
57+
@@ -14,7 +14,7 @@
58+
* See the License for the specific language governing permissions and
59+
* limitations under the License.
60+
*/
61+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
62+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
63+
import { Variant } from '../dynamiccolor/variant.js';
64+
/**
65+
* A playful theme - the source color's hue does not appear in the theme.
66+
diff --git a/scheme/scheme_monochrome.js b/scheme/scheme_monochrome.js
67+
index 30ad712ad104e397788ff3d8e11ea28ca00c0533..cc3b7d73de94cf7f2a66bf1ba8cc7a24f426d8a6 100644
68+
--- a/scheme/scheme_monochrome.js
69+
+++ b/scheme/scheme_monochrome.js
70+
@@ -14,7 +14,7 @@
71+
* See the License for the specific language governing permissions and
72+
* limitations under the License.
73+
*/
74+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
75+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
76+
import { Variant } from '../dynamiccolor/variant.js';
77+
/** A Dynamic Color theme that is grayscale. */
78+
export class SchemeMonochrome extends DynamicScheme {
79+
diff --git a/scheme/scheme_neutral.js b/scheme/scheme_neutral.js
80+
index 0d03a5e0f0200feb471860b48d5243dd5da5429d..6e0291a2158da4d4b704d5aa55ae69035b358c5c 100644
81+
--- a/scheme/scheme_neutral.js
82+
+++ b/scheme/scheme_neutral.js
83+
@@ -14,7 +14,7 @@
84+
* See the License for the specific language governing permissions and
85+
* limitations under the License.
86+
*/
87+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
88+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
89+
import { Variant } from '../dynamiccolor/variant.js';
90+
/** A Dynamic Color theme that is near grayscale. */
91+
export class SchemeNeutral extends DynamicScheme {
92+
diff --git a/scheme/scheme_rainbow.js b/scheme/scheme_rainbow.js
93+
index 65e6d3fd934ed07a2e6efdf6c552c306873d26e2..74c952cfa16090b55519ad37bae0aa56be5c0298 100644
94+
--- a/scheme/scheme_rainbow.js
95+
+++ b/scheme/scheme_rainbow.js
96+
@@ -14,7 +14,7 @@
97+
* See the License for the specific language governing permissions and
98+
* limitations under the License.
99+
*/
100+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
101+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
102+
import { Variant } from '../dynamiccolor/variant.js';
103+
/**
104+
* A playful theme - the source color's hue does not appear in the theme.
105+
diff --git a/scheme/scheme_tonal_spot.js b/scheme/scheme_tonal_spot.js
106+
index 6c506c3c23279e5842757b991cd066ef266fceea..c48f498c41e0cde98f34c3d7394a75ef1bf764cd 100644
107+
--- a/scheme/scheme_tonal_spot.js
108+
+++ b/scheme/scheme_tonal_spot.js
109+
@@ -14,7 +14,7 @@
110+
* See the License for the specific language governing permissions and
111+
* limitations under the License.
112+
*/
113+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
114+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
115+
import { Variant } from '../dynamiccolor/variant.js';
116+
/**
117+
* A Dynamic Color theme with low to medium colorfulness and a Tertiary
118+
diff --git a/scheme/scheme_vibrant.js b/scheme/scheme_vibrant.js
119+
index cba1172e7d7ccae62d03e635c38063153bc5a61a..9d54ed6d2c544c21df9bfc2b094bb06d7d8e48be 100644
120+
--- a/scheme/scheme_vibrant.js
121+
+++ b/scheme/scheme_vibrant.js
122+
@@ -14,7 +14,7 @@
123+
* See the License for the specific language governing permissions and
124+
* limitations under the License.
125+
*/
126+
-import { DynamicScheme } from '../dynamiccolor/dynamic_scheme';
127+
+import { DynamicScheme } from '../dynamiccolor/dynamic_scheme.js';
128+
import { Variant } from '../dynamiccolor/variant.js';
129+
/**
130+
* A Dynamic Color theme that maxes out colorfulness at each position in the

0 commit comments

Comments
 (0)