feature/fetch-fonts #14

Merged
ilia merged 76 commits from feature/fetch-fonts into main 2026-01-14 11:01:44 +00:00
3 changed files with 8 additions and 2 deletions
Showing only changes of commit 8ad29fd3a8 - Show all commits

View File

@@ -3,11 +3,13 @@
* DOMAIN TYPES
* ============================================================================
*/
import type { FontCategory as FontshareFontCategory } from './fontshare';
import type { FontCategory as GoogleFontCategory } from './google';
/**
* Font category
*/
export type FontCategory = 'sans-serif' | 'serif' | 'display' | 'handwriting' | 'monospace';
export type FontCategory = GoogleFontCategory | FontshareFontCategory;
/**
* Font provider

View File

@@ -8,6 +8,8 @@ import type { CollectionApiModel } from '$shared/types/collection';
export const FONTSHARE_API_URL = 'https://api.fontshare.com/v2' as const;
export type FontCategory = 'sans' | 'serif' | 'slab' | 'display' | 'handwritten' | 'script';
/**
* Model of Fontshare API response
* @see https://fontshare.com

View File

@@ -4,6 +4,8 @@
* ============================================================================
*/
export type FontCategory = 'sans-serif' | 'serif' | 'display' | 'handwriting' | 'monospace';
/**
* Model of google fonts api response
*/
@@ -29,7 +31,7 @@ export interface FontItem {
* Font category classification (e.g., "sans-serif", "serif", "display", "handwriting", "monospace")
* Useful for grouping and filtering fonts by style
*/
category: string;
category: FontCategory;
/**
* Available font variants for this font family