25 lines
641 B
Svelte
25 lines
641 B
Svelte
|
|
<!--
|
||
|
|
Component: AppBindings
|
||
|
|
Provider that starts app-wide store bindings (filters → sort → font catalog)
|
||
|
|
for its subtree. Mount-scoped so the bindings' lifetime tracks the app tree.
|
||
|
|
-->
|
||
|
|
<script lang="ts">
|
||
|
|
import { startFilterBindings } from '$features/FilterAndSortFonts';
|
||
|
|
import { onMount } from 'svelte';
|
||
|
|
import type { Snippet } from 'svelte';
|
||
|
|
|
||
|
|
interface Props {
|
||
|
|
/**
|
||
|
|
* Content snippet
|
||
|
|
*/
|
||
|
|
children?: Snippet;
|
||
|
|
}
|
||
|
|
|
||
|
|
let { children }: Props = $props();
|
||
|
|
|
||
|
|
// startFilterBindings returns its $effect.root cleanup; onMount runs it on unmount.
|
||
|
|
onMount(() => startFilterBindings());
|
||
|
|
</script>
|
||
|
|
|
||
|
|
{@render children?.()}
|