2026-04-17 12:14:55 +03:00
|
|
|
<!--
|
|
|
|
|
Component: Search
|
|
|
|
|
Typeface search input for the comparison view.
|
|
|
|
|
Updates the global filterManager query to filter the font list.
|
|
|
|
|
-->
|
2026-04-16 15:58:10 +03:00
|
|
|
<script lang="ts">
|
2026-05-23 16:59:59 +03:00
|
|
|
import { fontStore } from '$entities/Font';
|
|
|
|
|
import {
|
|
|
|
|
filterManager,
|
|
|
|
|
mapManagerToParams,
|
|
|
|
|
} from '$features/GetFonts';
|
2026-04-16 15:58:10 +03:00
|
|
|
import { SearchBar } from '$shared/ui';
|
2026-05-23 16:59:59 +03:00
|
|
|
import { untrack } from 'svelte';
|
|
|
|
|
|
|
|
|
|
$effect(() => {
|
|
|
|
|
const params = mapManagerToParams(filterManager);
|
|
|
|
|
untrack(() => fontStore.setParams(params));
|
|
|
|
|
});
|
2026-04-16 15:58:10 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="p-6 border-b border-black/5">
|
|
|
|
|
<SearchBar
|
|
|
|
|
id="font-search"
|
|
|
|
|
class="w-full"
|
|
|
|
|
placeholder="Typeface Search"
|
2026-04-19 19:14:49 +03:00
|
|
|
aria-label="Search typefaces"
|
2026-04-16 15:58:10 +03:00
|
|
|
bind:value={filterManager.queryValue}
|
|
|
|
|
fullWidth
|
|
|
|
|
/>
|
|
|
|
|
</div>
|