refactor(GetFonts): centralize filterManager/sortStore → fontStore bridge

Move the duplicated $effect blocks that mapped filterManager and sortStore
into fontStore params out of Search, FontSearch and FilterControls into a
single $effect.root in features/GetFonts/model/state/bindings.svelte.ts.

Consumers now bind to the manager/store directly; the bridge is installed
once via a side-effect import from the feature barrel.
This commit is contained in:
Ilia Mashkov
2026-05-24 15:05:28 +03:00
parent 1573950605
commit e60309af78
5 changed files with 46 additions and 30 deletions
@@ -1,21 +1,12 @@
<!--
Component: Search
Typeface search input for the comparison view.
Updates the global filterManager query to filter the font list.
Writes through filterManager; the global bridge in $features/GetFonts
propagates the value into fontStore.
-->
<script lang="ts">
import { fontStore } from '$entities/Font';
import {
filterManager,
mapManagerToParams,
} from '$features/GetFonts';
import { filterManager } from '$features/GetFonts';
import { SearchBar } from '$shared/ui';
import { untrack } from 'svelte';
$effect(() => {
const params = mapManagerToParams(filterManager);
untrack(() => fontStore.setParams(params));
});
</script>
<div class="p-6 border-b border-black/5">