feat: replace CJS require with static imports, add comprehensive layout system tests

This commit is contained in:
saberzero1
2026-07-27 20:23:31 +02:00
parent 6f27207fbf
commit 508f73a33f
9 changed files with 1096 additions and 183 deletions
+9 -1
View File
@@ -18,7 +18,8 @@ export interface RegisteredComponent {
manifest?: ComponentManifest
}
class ComponentRegistry {
/** @internal Exported for testing only. */
export class ComponentRegistry {
private components = new Map<string, RegisteredComponent>()
private instanceCache = new Map<string, QuartzComponent>()
private optionOverrides = new Map<string, Record<string, unknown>>()
@@ -111,6 +112,13 @@ class ComponentRegistry {
return results
}
/** @internal For testing only — resets all registry state. */
clear(): void {
this.components.clear()
this.instanceCache.clear()
this.optionOverrides.clear()
}
private findCachedInstance(
constructor: QuartzComponentConstructor<any>,
): QuartzComponent | undefined {