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,42 @@
import HTMLCollection from '../element/HTMLCollection.js';
import HTMLElement from '../html-element/HTMLElement.js';
import HTMLTableCellElement from '../html-table-cell-element/HTMLTableCellElement.js';
import * as PropertySymbol from '../../PropertySymbol.js';
/**
* HTMLTableRowElement
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement
*/
export default class HTMLTableRowElement extends HTMLElement {
[PropertySymbol.cells]: HTMLCollection<HTMLTableCellElement> | null;
/**
* Returns cells.
*
* @returns Cells.
*/
get cells(): HTMLCollection<HTMLTableCellElement>;
/**
* Returns a number that gives the logical position of the row within the entire table. If the row is not part of a table, returns -1.
*
* @returns Row index.
*/
get rowIndex(): number;
/**
* Returns a number that gives the logical position of the row within the table section it belongs to. If the row is not part of a section, returns -1.
*/
get sectionRowIndex(): number;
/**
* Returns an HTMLTableCellElement representing a new cell of the row. The cell is inserted in the collection of cells immediately before the given index position in the row. If index is -1, the new cell is appended to the collection. If index is less than -1 or greater than the number of cells in the collection, a DOMException with the value IndexSizeError is raised.
*
* @param [index] Index.
* @returns Cell.
*/
insertCell(index?: number): HTMLTableCellElement;
/**
* Removes the cell corresponding to index. If index is -1, the last cell of the row is removed. If index is less than -1 or greater than the amount of cells in the collection, a DOMException with the value IndexSizeError is raised.
*
* @param index Index.
*/
deleteCell(index: number): void;
}
//# sourceMappingURL=HTMLTableRowElement.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HTMLTableRowElement.d.ts","sourceRoot":"","sources":["../../../src/nodes/html-table-row-element/HTMLTableRowElement.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,WAAW,MAAM,gCAAgC,CAAC;AACzD,OAAO,oBAAoB,MAAM,oDAAoD,CAAC;AACtF,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAK1D;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IACpD,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,cAAc,CAAC,oBAAoB,CAAC,GAAG,IAAI,CAAQ;IAElF;;;;OAIG;IACH,IAAW,KAAK,IAAI,cAAc,CAAC,oBAAoB,CAAC,CAWvD;IAED;;;;OAIG;IACH,IAAW,QAAQ,IAAI,MAAM,CAY5B;IAED;;OAEG;IACH,IAAW,eAAe,IAAI,MAAM,CAYnC;IAED;;;;;OAKG;IACI,UAAU,CAAC,KAAK,GAAE,MAAW,GAAG,oBAAoB;IAiC3D;;;;OAIG;IACI,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;CAiCtC"}

View File

@@ -0,0 +1,105 @@
import HTMLCollection from '../element/HTMLCollection.js';
import HTMLElement from '../html-element/HTMLElement.js';
import * as PropertySymbol from '../../PropertySymbol.js';
import QuerySelector from '../../query-selector/QuerySelector.js';
import HTMLTableSectionElement from '../html-table-section-element/HTMLTableSectionElement.js';
import DOMExceptionNameEnum from '../../exception/DOMExceptionNameEnum.js';
/**
* HTMLTableRowElement
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement
*/
export default class HTMLTableRowElement extends HTMLElement {
[PropertySymbol.cells] = null;
/**
* Returns cells.
*
* @returns Cells.
*/
get cells() {
if (!this[PropertySymbol.cells]) {
this[PropertySymbol.cells] = new HTMLCollection(PropertySymbol.illegalConstructor, () => (QuerySelector.querySelectorAll(this, 'td,th')[PropertySymbol.items]));
}
return this[PropertySymbol.cells];
}
/**
* Returns a number that gives the logical position of the row within the entire table. If the row is not part of a table, returns -1.
*
* @returns Row index.
*/
get rowIndex() {
let parent = this.parentNode;
while (parent) {
if (parent[PropertySymbol.tagName] === 'TABLE') {
const rows = QuerySelector.querySelectorAll(parent, 'tr')[PropertySymbol.items];
return rows.indexOf(this);
}
parent = parent.parentNode;
}
return -1;
}
/**
* Returns a number that gives the logical position of the row within the table section it belongs to. If the row is not part of a section, returns -1.
*/
get sectionRowIndex() {
let parent = this.parentNode;
while (parent) {
if (parent instanceof HTMLTableSectionElement) {
const rows = QuerySelector.querySelectorAll(parent, 'tr')[PropertySymbol.items];
return rows.indexOf(this);
}
parent = parent.parentNode;
}
return -1;
}
/**
* Returns an HTMLTableCellElement representing a new cell of the row. The cell is inserted in the collection of cells immediately before the given index position in the row. If index is -1, the new cell is appended to the collection. If index is less than -1 or greater than the number of cells in the collection, a DOMException with the value IndexSizeError is raised.
*
* @param [index] Index.
* @returns Cell.
*/
insertCell(index = -1) {
if (typeof index !== 'number') {
index = -1;
}
const cells = QuerySelector.querySelectorAll(this, 'td,th')[PropertySymbol.items];
if (index < -1) {
throw new this[PropertySymbol.window].DOMException(`Failed to execute 'insertCell' on 'HTMLTableRowElement': The index provided (${index}) is less than -1.`, DOMExceptionNameEnum.indexSizeError);
}
if (index > cells.length) {
throw new this[PropertySymbol.window].DOMException(`Failed to execute 'insertCell' on 'HTMLTableRowElement': The index provided (${index}) is greater than the number of cells (${cells.length}).`, DOMExceptionNameEnum.indexSizeError);
}
const cell = this[PropertySymbol.ownerDocument].createElement('td');
if (index === -1 || index === cells.length) {
this.appendChild(cell);
return cell;
}
cells[index].parentNode.insertBefore(cell, cells[index]);
return cell;
}
/**
* Removes the cell corresponding to index. If index is -1, the last cell of the row is removed. If index is less than -1 or greater than the amount of cells in the collection, a DOMException with the value IndexSizeError is raised.
*
* @param index Index.
*/
deleteCell(index) {
if (arguments.length === 0) {
throw new this[PropertySymbol.window].TypeError("Failed to execute 'deleteCell' on 'HTMLTableRowElement': 1 argument required, but only 0 present.");
}
if (typeof index !== 'number') {
index = -1;
}
if (index < -1) {
throw new this[PropertySymbol.window].DOMException(`Failed to execute 'deleteCell' on 'HTMLTableRowElement': The index provided (${index}) is less than -1.`, DOMExceptionNameEnum.indexSizeError);
}
const cells = QuerySelector.querySelectorAll(this, 'td,th')[PropertySymbol.items];
if (index >= cells.length) {
throw new this[PropertySymbol.window].DOMException(`Failed to execute 'deleteCell' on 'HTMLTableRowElement': The index provided (${index}) is greater than the number of cells in the row (${cells.length}).`, DOMExceptionNameEnum.indexSizeError);
}
if (index === -1) {
index = cells.length - 1;
}
cells[index].remove();
}
}
//# sourceMappingURL=HTMLTableRowElement.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HTMLTableRowElement.js","sourceRoot":"","sources":["../../../src/nodes/html-table-row-element/HTMLTableRowElement.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,8BAA8B,CAAC;AAC1D,OAAO,WAAW,MAAM,gCAAgC,CAAC;AAEzD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAC;AAC1D,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,uBAAuB,MAAM,0DAA0D,CAAC;AAC/F,OAAO,oBAAoB,MAAM,yCAAyC,CAAC;AAE3E;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,WAAW;IACpD,CAAC,cAAc,CAAC,KAAK,CAAC,GAAgD,IAAI,CAAC;IAElF;;;;OAIG;IACH,IAAW,KAAK;QACf,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,CAAC;YACjC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,IAAI,cAAc,CAC9C,cAAc,CAAC,kBAAkB,EACjC,GAAG,EAAE,CACoB,CACvB,aAAa,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,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