doc: comments for codebase and updated documentation

This commit is contained in:
Ilia Mashkov
2026-01-18 15:55:07 +03:00
parent 8356e99382
commit 9cbf4fdc48
19 changed files with 111 additions and 44 deletions

View File

@@ -4,6 +4,11 @@ import type { FilterConfig } from '../../model';
/**
* Create a filter manager instance.
* - Uses debounce to update search query for better performance.
* - Manages filter instances for each group.
*
* @param config - Configuration for the filter manager.
* @returns - An instance of the filter manager.
*/
export function createFilterManager<TValue extends string>(config: FilterConfig<TValue>) {
const search = createDebouncedState(config.queryValue ?? '');

View File

@@ -1,6 +1,12 @@
import type { FontshareParams } from '$entities/Font';
import type { FilterManager } from '../filterManager/filterManager.svelte';
/**
* Maps filter manager to fontshare params.
*
* @param manager - Filter manager instance.
* @returns - Partial fontshare params.
*/
export function mapManagerToParams(manager: FilterManager): Partial<FontshareParams> {
return {
q: manager.debouncedQueryValue,