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
This commit is contained in:
2026-02-17 16:19:59 -05:00
parent 54df6018f5
commit de2d83092e
28274 changed files with 3816354 additions and 90 deletions

View File

@@ -0,0 +1,142 @@
import HTMLElement from '../html-element/HTMLElement.js';
/**
* HTML Hyperlink utility for HTMLAnchorElement and HTMLAreaElement.
*
* @see https://html.spec.whatwg.org/multipage/links.html#hyperlink
*/
export default class HTMLHyperlinkElementUtility {
private element;
/**
* Constructor.
*
* @param element Element.
*/
constructor(element: HTMLElement);
/**
* Returns the hyperlink's URL's origin.
*
* @returns Origin.
*/
getOrigin(): string;
/**
* Returns href.
*
* @returns Href.
*/
getHref(): string;
/**
* Sets href.
*
* @param href Href.
*/
setHref(href: string): void;
/**
* Returns protocol.
*
* @returns Protocol.
*/
getProtocol(): string;
/**
* Sets protocol.
*
* @param protocol Protocol.
*/
setProtocol(protocol: string): void;
/**
* Returns username.
*
* @returns Username.
*/
getUsername(): string;
/**
* Sets username.
*
* @param username Username.
*/
setUsername(username: string): void;
/**
* Returns password.
*
* @returns Password.
*/
getPassword(): string;
/**
* Sets password.
*
* @param password Password.
*/
setPassword(password: string): void;
/**
* Returns host.
*
* @returns Host.
*/
getHost(): string;
/**
* Sets host.
*
* @param host Host.
*/
setHost(host: string): void;
/**
* Returns hostname.
*
* @returns Hostname.
*/
getHostname(): string;
/**
* Sets hostname.
*
* @param hostname Hostname.
*/
setHostname(hostname: string): void;
/**
* Returns port.
*
* @returns Port.
*/
getPort(): string;
/**
* Sets port.
*
* @param port Port.
*/
setPort(port: string): void;
/**
* Returns pathname.
*
* @returns Pathname.
*/
getPathname(): string;
/**
* Sets pathname.
*
* @param pathname Pathname.
*/
setPathname(pathname: string): void;
/**
* Returns search.
*
* @returns Search.
*/
getSearch(): string;
/**
* Sets search.
*
* @param search Search.
*/
setSearch(search: string): void;
/**
* Returns hash.
*
* @returns Hash.
*/
getHash(): string;
/**
* Sets hash.
*
* @param hash Hash.
*/
setHash(hash: string): void;
}
//# sourceMappingURL=HTMLHyperlinkElementUtility.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HTMLHyperlinkElementUtility.d.ts","sourceRoot":"","sources":["../../../src/nodes/html-hyperlink-element/HTMLHyperlinkElementUtility.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAGzD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,2BAA2B;IAC/C,OAAO,CAAC,OAAO,CAAc;IAE7B;;;;OAIG;gBACS,OAAO,EAAE,WAAW;IAIhC;;;;OAIG;IACI,SAAS,IAAI,MAAM;IAQ1B;;;;OAIG;IACI,OAAO,IAAI,MAAM;IAexB;;;;OAIG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAIlC;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAQ5B;;;;OAIG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAW1C;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAQ5B;;;;OAIG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAW1C;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAQ5B;;;;OAIG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAW1C;;;;OAIG;IACI,OAAO,IAAI,MAAM;IAQxB;;;;OAIG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWlC;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAQ5B;;;;OAIG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAW1C;;;;OAIG;IACI,OAAO,IAAI,MAAM;IAQxB;;;;OAIG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWlC;;;;OAIG;IACI,WAAW,IAAI,MAAM;IAQ5B;;;;OAIG;IACI,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;IAW1C;;;;OAIG;IACI,SAAS,IAAI,MAAM;IAQ1B;;;;OAIG;IACI,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAWtC;;;;OAIG;IACI,OAAO,IAAI,MAAM;IAcxB;;;;OAIG;IACI,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAUlC"}

View File

@@ -0,0 +1,322 @@
import * as PropertySymbol from '../../PropertySymbol.js';
/**
* HTML Hyperlink utility for HTMLAnchorElement and HTMLAreaElement.
*
* @see https://html.spec.whatwg.org/multipage/links.html#hyperlink
*/
export default class HTMLHyperlinkElementUtility {
element;
/**
* Constructor.
*
* @param element Element.
*/
constructor(element) {
this.element = element;
}
/**
* Returns the hyperlink's URL's origin.
*
* @returns Origin.
*/
getOrigin() {
try {
return new URL(this.getHref()).origin;
}
catch (e) {
return '';
}
}
/**
* Returns href.
*
* @returns Href.
*/
getHref() {
if (!this.element.hasAttribute('href')) {
return '';
}
try {
return new URL(this.element.getAttribute('href'), this.element[PropertySymbol.ownerDocument].location.href).href;
}
catch (e) {
return this.element.getAttribute('href');
}
}
/**
* Sets href.
*
* @param href Href.
*/
setHref(href) {
this.element.setAttribute('href', href);
}
/**
* Returns protocol.
*
* @returns Protocol.
*/
getProtocol() {
try {
return new URL(this.getHref()).protocol;
}
catch (e) {
return '';
}
}
/**
* Sets protocol.
*
* @param protocol Protocol.
*/
setProtocol(protocol) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.protocol = protocol;
this.element.setAttribute('href', url.href);
}
/**
* Returns username.
*
* @returns Username.
*/
getUsername() {
try {
return new URL(this.getHref()).username;
}
catch (e) {
return '';
}
}
/**
* Sets username.
*
* @param username Username.
*/
setUsername(username) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.username = username;
this.element.setAttribute('href', url.href);
}
/**
* Returns password.
*
* @returns Password.
*/
getPassword() {
try {
return new URL(this.getHref()).password;
}
catch (e) {
return '';
}
}
/**
* Sets password.
*
* @param password Password.
*/
setPassword(password) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.password = password;
this.element.setAttribute('href', url.href);
}
/**
* Returns host.
*
* @returns Host.
*/
getHost() {
try {
return new URL(this.getHref()).host;
}
catch (e) {
return '';
}
}
/**
* Sets host.
*
* @param host Host.
*/
setHost(host) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.host = host;
this.element.setAttribute('href', url.href);
}
/**
* Returns hostname.
*
* @returns Hostname.
*/
getHostname() {
try {
return new URL(this.getHref()).hostname;
}
catch (e) {
return '';
}
}
/**
* Sets hostname.
*
* @param hostname Hostname.
*/
setHostname(hostname) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.hostname = hostname;
this.element.setAttribute('href', url.href);
}
/**
* Returns port.
*
* @returns Port.
*/
getPort() {
try {
return new URL(this.getHref()).port;
}
catch (e) {
return '';
}
}
/**
* Sets port.
*
* @param port Port.
*/
setPort(port) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.port = port;
this.element.setAttribute('href', url.href);
}
/**
* Returns pathname.
*
* @returns Pathname.
*/
getPathname() {
try {
return new URL(this.getHref()).pathname;
}
catch (e) {
return '';
}
}
/**
* Sets pathname.
*
* @param pathname Pathname.
*/
setPathname(pathname) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.pathname = pathname;
this.element.setAttribute('href', url.href);
}
/**
* Returns search.
*
* @returns Search.
*/
getSearch() {
try {
return new URL(this.getHref()).search;
}
catch (e) {
return '';
}
}
/**
* Sets search.
*
* @param search Search.
*/
setSearch(search) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.search = search;
this.element.setAttribute('href', url.href);
}
/**
* Returns hash.
*
* @returns Hash.
*/
getHash() {
const href = this.element.getAttribute('href');
if (href[0] === '#') {
return href;
}
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return '';
}
return url.hash;
}
/**
* Sets hash.
*
* @param hash Hash.
*/
setHash(hash) {
let url;
try {
url = new URL(this.getHref());
}
catch (e) {
return;
}
url.hash = hash;
this.element.setAttribute('href', url.href);
}
}
//# sourceMappingURL=HTMLHyperlinkElementUtility.js.map

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
/**
* HTMLHyperlinkElementUtils.
*
* Reference:
* https://html.spec.whatwg.org/multipage/links.html#htmlhyperlinkelementutils.
*/
export default interface IHTMLHyperlinkElement {
readonly origin: string;
href: string;
protocol: string;
username: string;
password: string;
host: string;
hostname: string;
port: string;
pathname: string;
search: string;
hash: string;
}
//# sourceMappingURL=IHTMLHyperlinkElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IHTMLHyperlinkElement.d.ts","sourceRoot":"","sources":["../../../src/nodes/html-hyperlink-element/IHTMLHyperlinkElement.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,OAAO,WAAW,qBAAqB;IAC7C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACb"}

View File

@@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=IHTMLHyperlinkElement.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IHTMLHyperlinkElement.js","sourceRoot":"","sources":["../../../src/nodes/html-hyperlink-element/IHTMLHyperlinkElement.ts"],"names":[],"mappings":""}