Skip to content

Commit 3146adc

Browse files
Ivan SemochkinIvan Semochkin
Ivan Semochkin
authored and
Ivan Semochkin
committed
update types
1 parent 3f28bc4 commit 3146adc

37 files changed

+408
-261
lines changed

package-lock.json

+41-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616
"@sveltejs/adapter-node": "^3.0.0",
1717
"@sveltejs/kit": "^2.0.0",
1818
"@sveltejs/vite-plugin-svelte": "^3.0.0",
19+
"@types/lodash.throttle": "^4.1.9",
1920
"prettier": "^3.1.1",
2021
"prettier-plugin-svelte": "^3.1.2",
2122
"svelte": "^4.2.7",
2223
"svelte-check": "^3.6.0",
2324
"tslib": "^2.4.1",
2425
"typescript": "^5.0.0",
25-
"vite": "^5.0.3"
26+
"vite": "^5.0.3",
27+
"postcss": "^8.4.32",
28+
"postcss-load-config": "^4.0.2",
29+
"autoprefixer": "^10.4.16"
2630
},
2731
"type": "module",
2832
"dependencies": {
29-
"autoprefixer": "^10.4.16",
30-
"lodash.debounce": "^4.0.8",
31-
"lodash.throttle": "^4.1.1",
32-
"postcss": "^8.4.32",
33-
"postcss-load-config": "^4.0.2"
33+
"lodash.throttle": "^4.1.1"
3434
}
3535
}

src/routes/app.css renamed to src/app.css

+6
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ body.dark {
9191
--bg-not-visited: hsla(220, 9%, 27%, 0.302);
9292
--bg-visited: hsla(359, 94%, 55%, 0.3);
9393
--bg-wall: hsl(0, 5%, 75%);
94+
95+
--color-nav-icon: hsla(0, 0%, 100%, 1);
96+
9497
}
9598

9699
body.light {
@@ -99,5 +102,8 @@ body.light {
99102
--bg-body: hsl(220, 3%, 21%);
100103
--bg-player: hsl(240, 10%, 30%);
101104
--bg-wall: hsla(0, 0%, 55%, 1);
105+
106+
--color-nav-icon: hsl(240, 10%, 30%);
107+
102108
}
103109

src/lib/Components/AlgoSelect.svelte

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<script>
1+
<script lang="ts">
22
import { selectedAlgorithm } from '$lib/stores/algorithm';
3-
import { displayNames } from '$lib/algorithms';
3+
import { displayNames, type AlgorithmName } from '$lib/algorithms';
44
import { pointerOutside } from '../actions/pointerOutside';
55
import { tool } from '$lib/stores/tool';
66
import { layout } from '$lib/stores/layout';
@@ -14,8 +14,8 @@
1414
isOpen = !isOpen;
1515
};
1616
17-
const selectAlgorithm = (name) => {
18-
selectedAlgorithm.set(name);
17+
const selectAlgorithm = (name: string) => {
18+
selectedAlgorithm.set(name as AlgorithmName);
1919
player.reset();
2020
grid.reset($layout.screen);
2121
};
@@ -27,7 +27,7 @@
2727
</div>
2828

2929
{#if isOpen}
30-
<ul use:pointerOutside on:pointer_outside={setIsOpen}>
30+
<ul use:pointerOutside={{ cb: setIsOpen }}>
3131
{#each Object.entries(displayNames) as [key, displayName]}
3232
<li class:selected={$selectedAlgorithm === key} on:pointerdown={() => selectAlgorithm(key)}>
3333
{displayName}

0 commit comments

Comments
 (0)