- 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
44 lines
1.2 KiB
JavaScript
44 lines
1.2 KiB
JavaScript
import * as FiberId from "../FiberId.js";
|
|
import { globalValue } from "../GlobalValue.js";
|
|
import * as FiberMessage from "./fiberMessage.js";
|
|
/** @internal */
|
|
const FiberScopeSymbolKey = "effect/FiberScope";
|
|
/** @internal */
|
|
export const FiberScopeTypeId = /*#__PURE__*/Symbol.for(FiberScopeSymbolKey);
|
|
/** @internal */
|
|
class Global {
|
|
[FiberScopeTypeId] = FiberScopeTypeId;
|
|
fiberId = FiberId.none;
|
|
roots = /*#__PURE__*/new Set();
|
|
add(_runtimeFlags, child) {
|
|
this.roots.add(child);
|
|
child.addObserver(() => {
|
|
this.roots.delete(child);
|
|
});
|
|
}
|
|
}
|
|
/** @internal */
|
|
class Local {
|
|
fiberId;
|
|
parent;
|
|
[FiberScopeTypeId] = FiberScopeTypeId;
|
|
constructor(fiberId, parent) {
|
|
this.fiberId = fiberId;
|
|
this.parent = parent;
|
|
}
|
|
add(_runtimeFlags, child) {
|
|
this.parent.tell(FiberMessage.stateful(parentFiber => {
|
|
parentFiber.addChild(child);
|
|
child.addObserver(() => {
|
|
parentFiber.removeChild(child);
|
|
});
|
|
}));
|
|
}
|
|
}
|
|
/** @internal */
|
|
export const unsafeMake = fiber => {
|
|
return new Local(fiber.id(), fiber);
|
|
};
|
|
/** @internal */
|
|
export const globalScope = /*#__PURE__*/globalValue(/*#__PURE__*/Symbol.for("effect/FiberScope/Global"), () => new Global());
|
|
//# sourceMappingURL=fiberScope.js.map
|