refactor(ComparisonView): import typography store via root barrel
comparisonStore reached getTypographySettingsStore through $features/AdjustTypography/model (deep, past the public API) while the catalog/lifecycle accessors already go through the $entities/Font root barrel. Re-path to $features/AdjustTypography so all three composed-store imports go through public APIs uniformly. Direction was always legal (widget -> feature, downward); this only closes the deep-import inconsistency. Consolidate the spec mock onto the root module accordingly and drop the now-dead /model mock.
This commit is contained in:
@@ -26,7 +26,7 @@ import {
|
||||
import {
|
||||
type TypographySettingsStore,
|
||||
getTypographySettingsStore,
|
||||
} from '$features/AdjustTypography/model';
|
||||
} from '$features/AdjustTypography';
|
||||
import { createPersistentStore } from '$shared/lib';
|
||||
import { untrack } from 'svelte';
|
||||
import { getPretextFontString } from '../../lib';
|
||||
|
||||
@@ -84,6 +84,12 @@ vi.mock('$entities/Font/model', async importOriginal => {
|
||||
};
|
||||
});
|
||||
|
||||
const mockTypography = vi.hoisted(() => ({
|
||||
weight: 400,
|
||||
renderedSize: 48,
|
||||
reset: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('$features/AdjustTypography', () => ({
|
||||
DEFAULT_TYPOGRAPHY_CONTROLS_DATA: [],
|
||||
createTypographyControlManager: vi.fn(() => ({
|
||||
@@ -91,15 +97,6 @@ vi.mock('$features/AdjustTypography', () => ({
|
||||
renderedSize: 48,
|
||||
reset: vi.fn(),
|
||||
})),
|
||||
}));
|
||||
|
||||
const mockTypography = vi.hoisted(() => ({
|
||||
weight: 400,
|
||||
renderedSize: 48,
|
||||
reset: vi.fn(),
|
||||
}));
|
||||
|
||||
vi.mock('$features/AdjustTypography/model', () => ({
|
||||
getTypographySettingsStore: () => mockTypography,
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user