feat: clean up apps and add publish (#13)

Reviewed-on: #13
Co-authored-by: Mitch Hijlkema <mitch@hijlkema.codes>
Co-committed-by: Mitch Hijlkema <mitch@hijlkema.codes>
This commit was merged in pull request #13.
This commit is contained in:
2025-11-30 20:38:22 +01:00
committed by elderbraum
parent 134dc79f3c
commit c1dcb19c22
27 changed files with 137 additions and 1272 deletions

View File

@@ -1,7 +1,7 @@
import { noChange } from 'lit';
import { AsyncDirective, directive } from 'lit/async-directive.js';
import { Observable, Subject, tap } from 'rxjs';
import { Observable, Subject, takeUntil, tap } from 'rxjs';
class Async extends AsyncDirective {
/** Private variables */
@@ -23,6 +23,7 @@ class Async extends AsyncDirective {
render(observable: Observable<unknown>) {
observable
.pipe(
takeUntil(this.destroy$),
tap((value: unknown) => {
this.setValue(value);
}),

View File

@@ -1,5 +1,5 @@
import { unsafeCSS } from 'lit';
export function variable(variableName: string, defaultValue?: string) {
export function variable(variableName: `--${string}`, defaultValue?: string) {
return unsafeCSS(`var(${variableName}${defaultValue ? `, ${defaultValue}` : ''})`);
}