@ethlete/core 5.0.0-next.71 → 5.0.0-next.73
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/CHANGELOG.md +19 -0
- package/design/resize-handles.ts +4 -0
- package/design/theme-css.js +6 -0
- package/design/theme-css.ts +14 -0
- package/fesm2022/ethlete-core.mjs +4520 -4520
- package/fesm2022/ethlete-core.mjs.map +1 -1
- package/generators/generators.json +3 -0
- package/generators/tailwind-4-surface-theme/generator.js +10 -0
- package/migrations.json +18 -0
- package/package.json +1 -1
- package/types/ethlete-core.d.ts +330 -330
|
@@ -32,16 +32,19 @@
|
|
|
32
32
|
"description": "Rewrite provideColorThemes into provideColorThemesWithTailwind4 and list the Tailwind 4 setup that is left"
|
|
33
33
|
},
|
|
34
34
|
"tailwind-4-color-theme": {
|
|
35
|
+
"scaffold": true,
|
|
35
36
|
"implementation": "./tailwind-4-color-theme/generator",
|
|
36
37
|
"schema": "./tailwind-4-color-theme/schema.json",
|
|
37
38
|
"description": "Generate color theming for Tailwind CSS v4"
|
|
38
39
|
},
|
|
39
40
|
"tailwind-4-surface-theme": {
|
|
41
|
+
"scaffold": true,
|
|
40
42
|
"implementation": "./tailwind-4-surface-theme/generator",
|
|
41
43
|
"schema": "./tailwind-4-surface-theme/schema.json",
|
|
42
44
|
"description": "Generate surface theming for Tailwind CSS v4"
|
|
43
45
|
},
|
|
44
46
|
"devtools-about": {
|
|
47
|
+
"scaffold": true,
|
|
45
48
|
"implementation": "./devtools-about/generator",
|
|
46
49
|
"schema": "./devtools-about/schema.json",
|
|
47
50
|
"description": "Generate the app's build info and wire it into provideQueryDevtools({ about })"
|
|
@@ -255,6 +255,16 @@ function parseSurfaceThemeObject(obj, sourceFile) {
|
|
|
255
255
|
}
|
|
256
256
|
continue;
|
|
257
257
|
}
|
|
258
|
+
if (propName === 'colorThemeVariants') {
|
|
259
|
+
const variants = resolveObjectLiteral(initializer, sourceFile);
|
|
260
|
+
theme.colorThemeVariants = Object.fromEntries((variants?.getProperties() ?? []).flatMap((variant) => {
|
|
261
|
+
const value = variant.isKind(SyntaxKind.PropertyAssignment) ? variant.getInitializer() : undefined;
|
|
262
|
+
return variant.isKind(SyntaxKind.PropertyAssignment) && value?.isKind(SyntaxKind.StringLiteral)
|
|
263
|
+
? [[variant.getName().replace(/^['"]|['"]$/gu, ''), value.getLiteralValue()]]
|
|
264
|
+
: [];
|
|
265
|
+
}));
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
258
268
|
if (propName === 'elevation') {
|
|
259
269
|
if (initializer.isKind(SyntaxKind.NumericLiteral)) {
|
|
260
270
|
theme.elevation = Number(initializer.getLiteralValue());
|
package/migrations.json
CHANGED
|
@@ -54,6 +54,24 @@
|
|
|
54
54
|
"scan": "@ethlete/core:migrate-legacy-color-themes",
|
|
55
55
|
"instructions": "./migrations/legacy-color-themes.md",
|
|
56
56
|
"docs": "/core/theming#migrating-from-runtime-theming"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "create-destroy",
|
|
60
|
+
"version": "5.0.0-next.62",
|
|
61
|
+
"kind": "auto",
|
|
62
|
+
"level": "optional",
|
|
63
|
+
"description": "Rewrite takeUntil(this.destroy$) on a createDestroy() field into takeUntilDestroyed().",
|
|
64
|
+
"generator": "@ethlete/core:migrate-create-destroy"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "color-theme-variants",
|
|
68
|
+
"version": "5.0.0-next.64",
|
|
69
|
+
"kind": "auto",
|
|
70
|
+
"level": "optional",
|
|
71
|
+
"description": "Rewrite surface theme colorTheme and semanticColorThemes into colorThemeVariants.",
|
|
72
|
+
"generator": "@ethlete/core:migrate-color-theme-variants",
|
|
73
|
+
"requires": ["ts-morph"],
|
|
74
|
+
"docs": "/core/theming"
|
|
57
75
|
}
|
|
58
76
|
]
|
|
59
77
|
}
|