feat: connect application input and output boundaries

This commit is contained in:
donghyeon-ka
2026-07-26 13:52:35 +09:00
parent 38ad69236b
commit 2dda17cf19
43 changed files with 697 additions and 215 deletions
+3 -11
View File
@@ -21,17 +21,9 @@ describe("color scheme policy", () => {
});
it("applies a persisted preference before application paint", () => {
const storage =
/** @type {import("../../src/application/ports/storage-port.js").StoragePort} */ ({
read: () => ({
ok: /** @type {const} */ (true),
value: "system",
}),
write: () => ({ ok: /** @type {const} */ (true) }),
remove: () => ({ ok: /** @type {const} */ (true) }),
});
const result = initializeColorScheme(storage, {
const result = initializeColorScheme({
getColorScheme: () => "system",
}, {
documentElement: document.documentElement,
matchMedia: () =>
/** @type {MediaQueryList} */ ({ matches: true }),