feat(fonts): implement Phase 4 - Update UI Components

- Replaced fontshareStore with unifiedFontStore in FontSearch.svelte
- Replaced fontshareStore with unifiedFontStore in SuggestedFonts.svelte
- Updated Font entity exports to include unifiedFontStore
- Updated model exports to include unified store exports
- Kept fontshareStore exports as deprecated for backward compatibility

Phase 4/7: Proxy API Integration for GlyphDiff
This commit is contained in:
Ilia Mashkov
2026-01-29 14:43:07 +03:00
parent 10801a641a
commit d6607e5705
4 changed files with 33 additions and 9 deletions

View File

@@ -1,3 +1,14 @@
// Proxy API (PRIMARY)
export {
fetchProxyFontById,
fetchProxyFonts,
} from './api/proxy/proxyFonts';
export type {
ProxyFontsParams,
ProxyFontsResponse,
} from './api/proxy/proxyFonts';
// Fontshare API (DEPRECATED)
export { export {
fetchAllFontshareFonts, fetchAllFontshareFonts,
fetchFontshareFontBySlug, fetchFontshareFontBySlug,
@@ -7,6 +18,8 @@ export type {
FontshareParams, FontshareParams,
FontshareResponse, FontshareResponse,
} from './api/fontshare/fontshare'; } from './api/fontshare/fontshare';
// Google Fonts API (DEPRECATED)
export { export {
fetchGoogleFontFamily, fetchGoogleFontFamily,
fetchGoogleFonts, fetchGoogleFonts,
@@ -61,13 +74,17 @@ export type {
export { export {
appliedFontsManager, appliedFontsManager,
createFontshareStore, createUnifiedFontStore,
fetchFontshareFontsQuery, fetchFontshareFontsQuery,
fontshareStore,
selectedFontsStore, selectedFontsStore,
unifiedFontStore,
} from './model'; } from './model';
// Stores // Stores (DEPRECATED)
export {
createFontshareStore,
fontshareStore,
} from './model';
export { export {
createGoogleFontsStore, createGoogleFontsStore,
GoogleFontsStore, GoogleFontsStore,

View File

@@ -38,8 +38,15 @@ export { fetchFontshareFontsQuery } from './services';
export { export {
appliedFontsManager, appliedFontsManager,
createUnifiedFontStore,
selectedFontsStore,
type UnifiedFontStore,
unifiedFontStore,
} from './store';
// DEPRECATED: Fontshare store (kept for backward compatibility)
export {
createFontshareStore, createFontshareStore,
type FontshareStore, type FontshareStore,
fontshareStore, fontshareStore,
selectedFontsStore, } from './store/fontshareStore.svelte';
} from './store';

View File

@@ -6,11 +6,11 @@
import { import {
FontListItem, FontListItem,
FontVirtualList, FontVirtualList,
fontshareStore, unifiedFontStore,
} from '$entities/Font'; } from '$entities/Font';
</script> </script>
<FontVirtualList items={fontshareStore.fonts}> <FontVirtualList items={unifiedFontStore.fonts}>
{#snippet children({ item: font, isVisible, proximity })} {#snippet children({ item: font, isVisible, proximity })}
<FontListItem {font} {isVisible} {proximity} /> <FontListItem {font} {isVisible} {proximity} />
{/snippet} {/snippet}

View File

@@ -4,7 +4,7 @@
Combines search input with font list display Combines search input with font list display
--> -->
<script lang="ts"> <script lang="ts">
import { fontshareStore } from '$entities/Font'; import { unifiedFontStore } from '$entities/Font';
import { import {
FilterControls, FilterControls,
Filters, Filters,
@@ -38,7 +38,7 @@ onMount(() => {
* We "plug" this manager into the global store. * We "plug" this manager into the global store.
* addBinding returns a function that removes this binding when the component unmounts. * addBinding returns a function that removes this binding when the component unmounts.
*/ */
const unbind = fontshareStore.addBinding(() => mapManagerToParams(filterManager)); const unbind = unifiedFontStore.addBinding(() => mapManagerToParams(filterManager));
return unbind; return unbind;
}); });