- 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
65 lines
2.0 KiB
TypeScript
65 lines
2.0 KiB
TypeScript
import * as PropertySymbol from '../PropertySymbol.js';
|
|
import HTMLElement from '../nodes/html-element/HTMLElement.js';
|
|
import Node from '../nodes/node/Node.js';
|
|
import BrowserWindow from '../window/BrowserWindow.js';
|
|
import ICustomElementDefinition from './ICustomElementDefinition.js';
|
|
/**
|
|
* 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
|