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,144 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const HTMLCollection_js_1 = __importDefault(require("../element/HTMLCollection.cjs"));
const HTMLElement_js_1 = __importDefault(require("../html-element/HTMLElement.cjs"));
const PropertySymbol = __importStar(require("../../PropertySymbol.cjs"));
const QuerySelector_js_1 = __importDefault(require("../../query-selector/QuerySelector.cjs"));
const HTMLTableSectionElement_js_1 = __importDefault(require("../html-table-section-element/HTMLTableSectionElement.cjs"));
const DOMExceptionNameEnum_js_1 = __importDefault(require("../../exception/DOMExceptionNameEnum.cjs"));
/**
* HTMLTableRowElement
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLTableRowElement
*/
class HTMLTableRowElement extends HTMLElement_js_1.default {
[PropertySymbol.cells] = null;
/**
* Returns cells.
*
* @returns Cells.
*/
get cells() {
if (!this[PropertySymbol.cells]) {
this[PropertySymbol.cells] = new HTMLCollection_js_1.default(PropertySymbol.illegalConstructor, () => (QuerySelector_js_1.default.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_js_1.default.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_js_1.default) {
const rows = QuerySelector_js_1.default.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_js_1.default.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_js_1.default.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_js_1.default.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_js_1.default.indexSizeError);
}
const cells = QuerySelector_js_1.default.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_js_1.default.indexSizeError);
}
if (index === -1) {
index = cells.length - 1;
}
cells[index].remove();
}
}
exports.default = HTMLTableRowElement;
//# sourceMappingURL=HTMLTableRowElement.cjs.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"HTMLTableRowElement.cjs","sourceRoot":"","sources":["../../../src/nodes/html-table-row-element/HTMLTableRowElement.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QAEzD,OAAO,IAAI,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,UAAU,CAAC,KAAa;QAC9B,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,SAAS,CAC9C,mGAAmG,CACnG,CAAC;QACH,CAAC;QAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YAC/B,KAAK,GAAG,CAAC,CAAC,CAAC;QACZ,CAAC;QAED,IAAI,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;YAChB,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CACjD,gFAAgF,KAAK,oBAAoB,EACzG,iCAAoB,CAAC,cAAc,CACnC,CAAC;QACH,CAAC;QAED,MAAM,KAAK,GAAG,0BAAa,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAElF,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC;YAC3B,MAAM,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,YAAY,CACjD,gFAAgF,KAAK,qDAAqD,KAAK,CAAC,MAAM,IAAI,EAC1J,iCAAoB,CAAC,cAAc,CACnC,CAAC;QACH,CAAC;QAED,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE,CAAC;YAClB,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAC1B,CAAC;QAED,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,EAAE,CAAC;IACvB,CAAC;CACD;AAtID,sCAsIC"}

View File

@@ -0,0 +1,42 @@
import HTMLCollection from '../element/HTMLCollection.cjs';
import HTMLElement from '../html-element/HTMLElement.cjs';
import HTMLTableCellElement from '../html-table-cell-element/HTMLTableCellElement.cjs';
import * as PropertySymbol from '../../PropertySymbol.cjs';
/**
* 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"}