doc: comments for codebase and updated documentation
This commit is contained in:
@@ -2,6 +2,13 @@ import { SvelteMap } from 'svelte/reactivity';
|
||||
|
||||
export type FontStatus = 'loading' | 'loaded' | 'error';
|
||||
|
||||
/**
|
||||
* Manager that handles loading of the fonts
|
||||
* Adds <link /> tags to <head />
|
||||
* - Uses batch loading to reduce the number of requests
|
||||
* - Uses a queue to prevent too many requests at once
|
||||
* - Purges unused fonts after a certain time
|
||||
*/
|
||||
class AppliedFontsManager {
|
||||
// Stores: slug -> timestamp of last visibility
|
||||
#usageTracker = new Map<string, number>();
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import { createEntityStore } from '$shared/lib';
|
||||
import type { UnifiedFont } from '../../types';
|
||||
|
||||
/**
|
||||
* Store that handles collection of selected fonts
|
||||
*/
|
||||
export const selectedFontsStore = createEntityStore<UnifiedFont>([]);
|
||||
|
||||
Reference in New Issue
Block a user