refactor(comparison): replace comparisonStore singleton with lazy getComparisonStore
Mirror the font-catalog change in ComparisonView: expose getComparisonStore() (plus __resetComparisonStore for tests) instead of an eager comparisonStore singleton, and consume getFontCatalog() internally. Update the model barrel and all UI consumers (Sidebar, FontList, Header, Line, SliderArea); Character no longer needs the store and reads everything from props. Update both specs to the accessor: comparisonStore.test mocks getFontCatalog with a writable stub (the real store's fonts is getter-only) and resets the catalog between cases; Sidebar.svelte.test resolves the store via the accessor. Also document Character's props.
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
export {
|
||||
comparisonStore,
|
||||
type Side,
|
||||
} from './stores/comparisonStore.svelte';
|
||||
export { getComparisonStore } from './stores/comparisonStore.svelte';
|
||||
|
||||
export type { Side } from './stores/comparisonStore.svelte';
|
||||
|
||||
Reference in New Issue
Block a user