feat: Theme studio v2

This commit is contained in:
2026-04-27 03:02:13 +02:00
parent 11c2588e45
commit 1b91eacb5b
52 changed files with 2792 additions and 844 deletions

View File

@@ -0,0 +1,14 @@
export function toCssStylePropertyName(propertyName: string): string {
if (propertyName.startsWith('--')) {
return propertyName;
}
return propertyName.replace(/([A-Z])/g, '-$1').toLowerCase();
}
export function applyThemeStyleDeclaration(host: HTMLElement, propertyName: string, value: string): string {
const cssPropertyName = toCssStylePropertyName(propertyName);
host.style.setProperty(cssPropertyName, value);
return cssPropertyName;
}