import { type Filter } from '$shared/lib'; import { SvelteMap } from 'svelte/reactivity'; import type { FontProvider } from '../types'; import type { CheckboxFilter } from '../types/common'; import type { BaseFontStore } from './baseFontStore.svelte'; import { createFontshareStore } from './fontshareStore.svelte'; import type { ProviderParams } from './types'; export class UnitedFontStore { private sources: Partial>>; filters: SvelteMap; queryValue = $state(''); constructor(initialConfig: Partial> = {}) { this.sources = { fontshare: createFontshareStore(initialConfig?.fontshare), }; this.filters = new SvelteMap(); } get fonts() { return Object.values(this.sources).map(store => store.fonts).flat(); } }