fix(CssManager): Make CssManager a singleton and export the shared instance via getSingleton; update tests and dependencies

This commit is contained in:
2025-11-16 14:53:02 +00:00
parent 217ea3e9d4
commit 8d60911b34
8 changed files with 2734 additions and 1167 deletions

24
test/test.chromium.ts Normal file
View File

@@ -0,0 +1,24 @@
import { expect, tap } from '@push.rocks/tapbundle';
import * as deesElement from '../ts/index.js';
tap.test('should create a static element', async () => {
@deesElement.customElement('my-button')
class MyButton extends deesElement.DeesElement {
// STATIC
public static styles = [
deesElement.cssManager.defaultStyles,
deesElement.css`
.buttonClass {
background: ${deesElement.cssManager.bdTheme('blue', 'black')};
}
`,
];
// INSTANCE
render() {
return deesElement.html`<div class="buttonClass">My Button</div>`;
}
}
});
tap.start();