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,7 @@
import IMutationObserverInit from './IMutationObserverInit.js';
import MutationRecord from './MutationRecord.js';
export default interface IMutationListener {
options: IMutationObserverInit;
callback: WeakRef<(record: MutationRecord) => void>;
}
//# sourceMappingURL=IMutationListener.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IMutationListener.d.ts","sourceRoot":"","sources":["../../src/mutation-observer/IMutationListener.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD,MAAM,CAAC,OAAO,WAAW,iBAAiB;IACzC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,EAAE,cAAc,KAAK,IAAI,CAAC,CAAC;CACpD"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"IMutationListener.js","sourceRoot":"","sources":["../../src/mutation-observer/IMutationListener.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,15 @@
/**
* Mutation observer init configurations.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserverInit
*/
export default interface IMutationObserverInit {
attributeFilter?: string[];
attributeOldValue?: boolean;
attributes?: boolean;
characterData?: boolean;
characterDataOldValue?: boolean;
childList?: boolean;
subtree?: boolean;
}
//# sourceMappingURL=IMutationObserverInit.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"IMutationObserverInit.d.ts","sourceRoot":"","sources":["../../src/mutation-observer/IMutationObserverInit.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,OAAO,WAAW,qBAAqB;IAC7C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB"}

View File

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

View File

@@ -0,0 +1 @@
{"version":3,"file":"IMutationObserverInit.js","sourceRoot":"","sources":["../../src/mutation-observer/IMutationObserverInit.ts"],"names":[],"mappings":""}

View File

@@ -0,0 +1,42 @@
import * as PropertySymbol from '../PropertySymbol.js';
import Node from '../nodes/node/Node.js';
import BrowserWindow from '../window/BrowserWindow.js';
import IMutationObserverInit from './IMutationObserverInit.js';
import MutationRecord from './MutationRecord.js';
/**
* The MutationObserver interface provides the ability to watch for changes being made to the DOM tree.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
*/
export default class MutationObserver {
#private;
protected [PropertySymbol.window]: BrowserWindow;
/**
* Constructor.
*
* @param callback Callback.
*/
constructor(callback: (records: MutationRecord[], observer: MutationObserver) => void);
/**
* Starts observing.
*
* @param target Target.
* @param options Options.
*/
observe(target: Node, options: IMutationObserverInit): void;
/**
* Disconnects.
*/
disconnect(): void;
/**
* Returns a list of all matching DOM changes that have been detected but not yet processed by the observer's callback function, leaving the mutation queue empty.
*
* @returns Records.
*/
takeRecords(): MutationRecord[];
/**
*
*/
[PropertySymbol.destroy](): void;
}
//# sourceMappingURL=MutationObserver.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationObserver.d.ts","sourceRoot":"","sources":["../../src/mutation-observer/MutationObserver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AACvD,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAE/D,OAAO,cAAc,MAAM,qBAAqB,CAAC;AAEjD;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;;IAEpC,UAAkB,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,aAAa,CAAC;IAKzD;;;;OAIG;gBACS,QAAQ,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI;IAUrF;;;;;OAKG;IACI,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,qBAAqB,GAAG,IAAI;IA2FlE;;OAEG;IACI,UAAU,IAAI,IAAI;IAoBzB;;;;OAIG;IACI,WAAW,IAAI,cAAc,EAAE;IAQtC;;OAEG;IACI,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,IAAI;CAIvC"}

View File

@@ -0,0 +1,134 @@
import * as PropertySymbol from '../PropertySymbol.js';
import MutationObserverListener from './MutationObserverListener.js';
/**
* The MutationObserver interface provides the ability to watch for changes being made to the DOM tree.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver
*/
export default class MutationObserver {
#callback;
#listeners = [];
#destroyed = false;
/**
* Constructor.
*
* @param callback Callback.
*/
constructor(callback) {
if (!this[PropertySymbol.window]) {
throw new TypeError(`Failed to construct '${this.constructor.name}': '${this.constructor.name}' was constructed outside a Window context.`);
}
this.#callback = callback;
}
/**
* Starts observing.
*
* @param target Target.
* @param options Options.
*/
observe(target, options) {
if (this.#destroyed) {
return;
}
if (!target) {
throw new this[PropertySymbol.window].TypeError(`Failed to execute 'observe' on 'MutationObserver': The first parameter "target" should be of type "Node".`);
}
if (options && (options.attributeFilter || options.attributeOldValue)) {
if (options.attributes === undefined) {
options = Object.assign({}, options, {
attributes: true,
attributeFilter: options.attributeFilter,
attributeOldValue: options.attributeOldValue
});
}
if (!options.attributes && options.attributeOldValue) {
throw new this[PropertySymbol.window].TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'attributeOldValue' to true when 'attributes' is true or not present.`);
}
if (!options.attributes && options.attributeFilter) {
throw new this[PropertySymbol.window].TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'attributeFilter' when 'attributes' is true or not present.`);
}
}
if (options && options.characterDataOldValue) {
if (options.characterData === undefined) {
options = Object.assign({}, options, {
characterData: true,
characterDataOldValue: options.characterDataOldValue
});
}
if (!options.characterData && options.characterDataOldValue) {
throw new this[PropertySymbol.window].TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object may only set 'characterDataOldValue' to true when 'characterData' is true or not present.`);
}
}
if (!options || (!options.childList && !options.attributes && !options.characterData)) {
throw new this[PropertySymbol.window].TypeError(`Failed to execute 'observe' on 'MutationObserver': The options object must set at least one of 'attributes', 'characterData', or 'childList' to true.`);
}
// Makes sure that attribute names are lower case.
// TODO: Is this correct?
options = Object.assign({}, options, {
attributeFilter: options.attributeFilter
? options.attributeFilter.map((name) => name.toLowerCase())
: null
});
/**
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver/observe#reusing_mutationobservers
*/
for (const listener of this.#listeners) {
if (listener.target === target) {
listener.options = options;
return;
}
}
const listener = new MutationObserverListener({
window: this[PropertySymbol.window],
options,
callback: this.#callback.bind(this),
observer: this,
target
});
this.#listeners.push(listener);
// Stores all observers on the window object, so that they can be disconnected when the window is closed.
if (!this[PropertySymbol.window][PropertySymbol.mutationObservers].includes(this)) {
this[PropertySymbol.window][PropertySymbol.mutationObservers].push(this);
}
// Starts observing target node.
target[PropertySymbol.observeMutations](listener.mutationListener);
}
/**
* Disconnects.
*/
disconnect() {
if (this.#listeners.length === 0) {
return;
}
for (const listener of this.#listeners) {
listener.target[PropertySymbol.unobserveMutations](listener.mutationListener);
listener.destroy();
}
this.#listeners = [];
const mutationObservers = this[PropertySymbol.window][PropertySymbol.mutationObservers];
const index = mutationObservers.indexOf(this);
if (index !== -1) {
mutationObservers.splice(index, 1);
}
}
/**
* Returns a list of all matching DOM changes that have been detected but not yet processed by the observer's callback function, leaving the mutation queue empty.
*
* @returns Records.
*/
takeRecords() {
let records = [];
for (const listener of this.#listeners) {
records = records.concat(listener.takeRecords());
}
return records;
}
/**
*
*/
[PropertySymbol.destroy]() {
this.#destroyed = true;
this.disconnect();
}
}
//# sourceMappingURL=MutationObserver.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationObserver.js","sourceRoot":"","sources":["../../src/mutation-observer/MutationObserver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,sBAAsB,CAAC;AAIvD,OAAO,wBAAwB,MAAM,+BAA+B,CAAC;AAGrE;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,gBAAgB;IAGpC,SAAS,CAAkE;IAC3E,UAAU,GAA+B,EAAE,CAAC;IAC5C,UAAU,GAAY,KAAK,CAAC;IAE5B;;;;OAIG;IACH,YAAY,QAAyE;QACpF,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,CAAC;YAClC,MAAM,IAAI,SAAS,CAClB,wBAAwB,IAAI,CAAC,WAAW,CAAC,IAAI,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,6CAA6C,CACtH,CAAC;QACH,CAAC;QAED,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED;;;;;OAKG;IACI,OAAO,CAAC,MAAY,EAAE,OAA8B;QAC1D,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACR,CAAC;QAED,IAAI,CAAC,MAAM,EA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,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,UAAU,EAAE,CAAC;IACnB,CAAC;CACD"}

View File

@@ -0,0 +1,47 @@
import IMutationObserverInit from './IMutationObserverInit.js';
import MutationObserver from './MutationObserver.js';
import MutationRecord from './MutationRecord.js';
import Node from '../nodes/node/Node.js';
import BrowserWindow from '../window/BrowserWindow.js';
import IMutationListener from './IMutationListener.js';
/**
* Mutation Observer Listener.
*/
export default class MutationObserverListener {
#private;
readonly target: Node;
options: IMutationObserverInit;
mutationListener: IMutationListener;
/**
* Constructor.
*
* @param init Options.
* @param init.window Window.
* @param init.options Options.
* @param init.target Target.
* @param init.observer Observer.
* @param init.callback Callback.
*/
constructor(init: {
window: BrowserWindow;
options: IMutationObserverInit;
target: Node;
observer: MutationObserver;
callback: (record: MutationRecord[], observer: MutationObserver) => void;
});
/**
* Reports mutations.
*
* @param record Record.
*/
report(record: MutationRecord): void;
/**
* Destroys the listener.
*/
takeRecords(): MutationRecord[];
/**
* Destroys the listener.
*/
destroy(): void;
}
//# sourceMappingURL=MutationObserverListener.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationObserverListener.d.ts","sourceRoot":"","sources":["../../src/mutation-observer/MutationObserverListener.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,cAAc,MAAM,qBAAqB,CAAC;AACjD,OAAO,IAAI,MAAM,uBAAuB,CAAC;AACzC,OAAO,aAAa,MAAM,4BAA4B,CAAC;AACvD,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,wBAAwB;;IAC5C,SAAgB,MAAM,EAAE,IAAI,CAAC;IACtB,OAAO,EAAE,qBAAqB,CAAC;IAC/B,gBAAgB,EAAE,iBAAiB,CAAC;IAO3C;;;;;;;;;OASG;gBACS,IAAI,EAAE;QACjB,MAAM,EAAE,aAAa,CAAC;QACtB,OAAO,EAAE,qBAAqB,CAAC;QAC/B,MAAM,EAAE,IAAI,CAAC;QACb,QAAQ,EAAE,gBAAgB,CAAC;QAC3B,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;KACzE;IAYD;;;;OAIG;IACI,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;IAoB3C;;OAEG;IACI,WAAW,IAAI,cAAc,EAAE;IAStC;;OAEG;IACI,OAAO,IAAI,IAAI;CAatB"}

View File

@@ -0,0 +1,83 @@
/**
* Mutation Observer Listener.
*/
export default class MutationObserverListener {
target;
options;
mutationListener;
#window;
#observer;
#callback;
#records = [];
#timeout = null;
/**
* Constructor.
*
* @param init Options.
* @param init.window Window.
* @param init.options Options.
* @param init.target Target.
* @param init.observer Observer.
* @param init.callback Callback.
*/
constructor(init) {
this.options = init.options;
this.target = init.target;
this.mutationListener = {
options: init.options,
callback: new WeakRef((record) => this.report(record))
};
this.#window = init.window;
this.#observer = init.observer;
this.#callback = init.callback;
}
/**
* Reports mutations.
*
* @param record Record.
*/
report(record) {
if (!this.#records) {
return;
}
this.#records.push(record);
if (this.#timeout) {
this.#window.clearTimeout(this.#timeout);
}
this.#timeout = this.#window.setTimeout(() => {
const records = this.#records;
if (records?.length > 0) {
this.#records = [];
this.#callback(records, this.#observer);
}
});
}
/**
* Destroys the listener.
*/
takeRecords() {
if (this.#timeout) {
this.#window.clearTimeout(this.#timeout);
}
const records = this.#records;
this.#records = [];
return records;
}
/**
* Destroys the listener.
*/
destroy() {
if (this.#timeout) {
this.#window.clearTimeout(this.#timeout);
}
this.options = null;
this.target = null;
this.mutationListener = null;
this.#window = null;
this.#observer = null;
this.#callback = null;
this.#timeout = null;
this.#records = null;
}
}
//# sourceMappingURL=MutationObserverListener.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationObserverListener.js","sourceRoot":"","sources":["../../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,IAAI,OAAO,EAAE,MAAM,GAAG,CAAC,EAAE,CAAC;gBACzB,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;gBACnB,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;YACzC,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,WAAW;QACjB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACD,MAAM,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,EAAE,CAAC;QACnB,OAAO,OAAO,CAAC;IAChB,CAAC;IAED;;OAEG;IACI,OAAO;QACb,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YACnB,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAC1C,CAAC;QACM,IAAI,CAAC,OAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,MAAO,GAAG,IAAI,CAAC;QACpB,IAAI,CAAC,gBAAiB,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,OAAQ,GAAG,IAAI,CAAC;QACrB,IAAI,CAAC,SAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,SAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,QAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,QAAS,GAAG,IAAI,CAAC;IAC9B,CAAC;CACD"}

View File

@@ -0,0 +1,24 @@
import Node from '../nodes/node/Node.js';
/**
* MutationRecord is a model for a mutation.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
*/
export default class MutationRecord {
type: string;
target: Node;
addedNodes: Node[];
removedNodes: Node[];
previousSibling: Node;
nextSibling: Node;
attributeName: string;
attributeNamespace: string;
oldValue: string;
/**
* Constructor.
*
* @param init Options to initialize the mutation record.
*/
constructor(init?: Partial<MutationRecord>);
}
//# sourceMappingURL=MutationRecord.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationRecord.d.ts","sourceRoot":"","sources":["../../src/mutation-observer/MutationRecord.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,uBAAuB,CAAC;AAEzC;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAC3B,IAAI,EAAE,MAAM,CAAQ;IACpB,MAAM,EAAE,IAAI,CAAQ;IACpB,UAAU,EAAE,IAAI,EAAE,CAAM;IACxB,YAAY,EAAE,IAAI,EAAE,CAAM;IAC1B,eAAe,EAAE,IAAI,CAAQ;IAC7B,WAAW,EAAE,IAAI,CAAQ;IACzB,aAAa,EAAE,MAAM,CAAQ;IAC7B,kBAAkB,EAAE,MAAM,CAAQ;IAClC,QAAQ,EAAE,MAAM,CAAQ;IAE/B;;;;OAIG;gBACS,IAAI,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC;CAG1C"}

View File

@@ -0,0 +1,25 @@
/**
* MutationRecord is a model for a mutation.
*
* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationRecord
*/
export default class MutationRecord {
type = null;
target = null;
addedNodes = [];
removedNodes = [];
previousSibling = null;
nextSibling = null;
attributeName = null;
attributeNamespace = null;
oldValue = null;
/**
* Constructor.
*
* @param init Options to initialize the mutation record.
*/
constructor(init) {
Object.assign(this, init);
}
}
//# sourceMappingURL=MutationRecord.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationRecord.js","sourceRoot":"","sources":["../../src/mutation-observer/MutationRecord.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,MAAM,CAAC,OAAO,OAAO,cAAc;IAC3B,IAAI,GAAW,IAAI,CAAC;IACpB,MAAM,GAAS,IAAI,CAAC;IACpB,UAAU,GAAW,EAAE,CAAC;IACxB,YAAY,GAAW,EAAE,CAAC;IAC1B,eAAe,GAAS,IAAI,CAAC;IAC7B,WAAW,GAAS,IAAI,CAAC;IACzB,aAAa,GAAW,IAAI,CAAC;IAC7B,kBAAkB,GAAW,IAAI,CAAC;IAClC,QAAQ,GAAW,IAAI,CAAC;IAE/B;;;;OAIG;IACH,YAAY,IAA8B;QACzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC3B,CAAC;CACD"}

View File

@@ -0,0 +1,7 @@
declare enum MutationTypeEnum {
attributes = "attributes",
characterData = "characterData",
childList = "childList"
}
export default MutationTypeEnum;
//# sourceMappingURL=MutationTypeEnum.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationTypeEnum.d.ts","sourceRoot":"","sources":["../../src/mutation-observer/MutationTypeEnum.ts"],"names":[],"mappings":"AAAA,aAAK,gBAAgB;IACpB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,SAAS,cAAc;CACvB;AAED,eAAe,gBAAgB,CAAC"}

View File

@@ -0,0 +1,8 @@
var MutationTypeEnum;
(function (MutationTypeEnum) {
MutationTypeEnum["attributes"] = "attributes";
MutationTypeEnum["characterData"] = "characterData";
MutationTypeEnum["childList"] = "childList";
})(MutationTypeEnum || (MutationTypeEnum = {}));
export default MutationTypeEnum;
//# sourceMappingURL=MutationTypeEnum.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"MutationTypeEnum.js","sourceRoot":"","sources":["../../src/mutation-observer/MutationTypeEnum.ts"],"names":[],"mappings":"AAAA,IAAK,gBAIJ;AAJD,WAAK,gBAAgB;IACpB,6CAAyB,CAAA;IACzB,mDAA+B,CAAA;IAC/B,2CAAuB,CAAA;AACxB,CAAC,EAJI,gBAAgB,KAAhB,gBAAgB,QAIpB;AAED,eAAe,gBAAgB,CAAC"}