Files
headroom/frontend/node_modules/happy-dom/cjs/custom-element/CustomElementRegistry.d.ts
Santhosh Janardhanan de2d83092e feat: Reinitialize frontend with SvelteKit and TypeScript
- Delete old Vite+Svelte frontend
- Initialize new SvelteKit project with TypeScript
- Configure Tailwind CSS v4 + DaisyUI
- Implement JWT authentication with auto-refresh
- Create login page with form validation (Zod)
- Add protected route guards
- Update Docker configuration for single-stage build
- Add E2E tests with Playwright (6/11 passing)
- Fix Svelte 5 reactivity with $state() runes

Known issues:
- 5 E2E tests failing (timing/async issues)
- Token refresh implementation needs debugging
- Validation error display timing
2026-02-17 16:19:59 -05:00

65 lines
2.0 KiB
TypeScript

import * as PropertySymbol from '../PropertySymbol.cjs';
import HTMLElement from '../nodes/html-element/HTMLElement.cjs';
import Node from '../nodes/node/Node.cjs';
import BrowserWindow from '../window/BrowserWindow.cjs';
import ICustomElementDefinition from './ICustomElementDefinition.cjs';
/**
* Custom elements registry.
*/
export default class CustomElementRegistry {
#private;
[PropertySymbol.registry]: Map<string, ICustomElementDefinition>;
[PropertySymbol.classRegistry]: Map<typeof HTMLElement, string>;
[PropertySymbol.callbacks]: Map<string, Array<() => void>>;
[PropertySymbol.destroyed]: boolean;
/**
* Constructor.
*
* @param window Window.
*/
constructor(window: BrowserWindow);
/**
* Defines a custom element class.
*
* @param name Tag name of element.
* @param elementClass Element class.
* @param [options] Options.
* @param [options.extends] Extends tag name.
*/
define(name: string, elementClass: typeof HTMLElement, options?: {
extends?: string;
}): void;
/**
* Returns a defined element class.
*
* @param name Tag name of element.
* @returns HTMLElement Class defined or undefined.
*/
get(name: string): typeof HTMLElement | undefined;
/**
* Upgrades a custom element directly, even before it is connected to its shadow root.
*
* Not implemented yet.
*
* @param _root Root node.
*/
upgrade(_root: Node): void;
/**
* When defined.
*
* @param name Tag name of element.
*/
whenDefined(name: string): Promise<void>;
/**
* Reverse lookup searching for name by given element class.
*
* @param elementClass Class constructor.
* @returns Found tag name or `null`.
*/
getName(elementClass: typeof HTMLElement): string | null;
/**
* Destroys the registry.
*/
[PropertySymbol.destroy](): void;
}
//# sourceMappingURL=CustomElementRegistry.d.ts.map