0b675635b3
Convert appliedFilterStore, availableFilterStore and sortStore from eager module-level singletons to getAppliedFilterStore/getAvailableFilterStore/ getSortStore lazy accessors (+ __reset* helpers for tests), so the availableFilterStore QueryObserver is built on first use rather than at import. Update barrels, the startFilterBindings bridge, and all consumers. Reactive reads in components are wrapped in $derived; two-way bind:value targets resolve the accessor once and bind directly (a $derived is read-only).
24 lines
675 B
Svelte
24 lines
675 B
Svelte
<!--
|
|
Component: Search
|
|
Typeface search input for the comparison view.
|
|
Writes through appliedFilterStore; the global bridge in $features/FilterAndSortFonts
|
|
propagates the value into fontCatalogStore.
|
|
-->
|
|
<script lang="ts">
|
|
import { getAppliedFilterStore } from '$features/FilterAndSortFonts';
|
|
import { SearchBar } from '$shared/ui';
|
|
|
|
const appliedFilterStore = getAppliedFilterStore();
|
|
</script>
|
|
|
|
<div class="p-6 border-b border-subtle">
|
|
<SearchBar
|
|
id="font-search"
|
|
class="w-full"
|
|
placeholder="Typeface Search"
|
|
aria-label="Search typefaces"
|
|
bind:value={appliedFilterStore.queryValue}
|
|
fullWidth
|
|
/>
|
|
</div>
|