refactor(features): rename SetupFont to AdjustTypography + reorganize
Structural: - Merge factory + singleton from lib/settingsManager and model/state into one model/store/typographySettingsStore/ slice - Drop now-empty lib/ and model/state/ directories Semantic: - Rename feature SetupFont -> AdjustTypography (the feature owns continuous typography adjustment, not one-time font setup) - Drop "Manager" from TypographySettingsManager -> TypographySettingsStore (class + factory); singleton typographySettingsStore unchanged All consumers (Character, Line, SampleList, SliderArea, FontSampler, comparisonStore) updated. Public barrel signature changed: now exports createTypographySettingsStore and type TypographySettingsStore.
This commit is contained in:
@@ -21,7 +21,7 @@ import {
|
||||
fontStore,
|
||||
getFontUrl,
|
||||
} from '$entities/Font';
|
||||
import { typographySettingsStore } from '$features/SetupFont/model';
|
||||
import { typographySettingsStore } from '$features/AdjustTypography/model';
|
||||
import { createPersistentStore } from '$shared/lib';
|
||||
import { untrack } from 'svelte';
|
||||
import { getPretextFontString } from '../../lib';
|
||||
|
||||
@@ -71,7 +71,7 @@ vi.mock('$entities/Font', async importOriginal => {
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock('$features/SetupFont', () => ({
|
||||
vi.mock('$features/AdjustTypography', () => ({
|
||||
DEFAULT_TYPOGRAPHY_CONTROLS_DATA: [],
|
||||
createTypographyControlManager: vi.fn(() => ({
|
||||
weight: 400,
|
||||
@@ -80,7 +80,7 @@ vi.mock('$features/SetupFont', () => ({
|
||||
})),
|
||||
}));
|
||||
|
||||
vi.mock('$features/SetupFont/model', () => ({
|
||||
vi.mock('$features/AdjustTypography/model', () => ({
|
||||
typographySettingsStore: {
|
||||
weight: 400,
|
||||
renderedSize: 48,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Renders a single character with morphing animation
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { typographySettingsStore } from '$features/SetupFont';
|
||||
import { typographySettingsStore } from '$features/AdjustTypography';
|
||||
import { cn } from '$shared/lib';
|
||||
import { comparisonStore } from '../../model';
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Renders a line of text in the SliderArea
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { typographySettingsStore } from '$features/SetupFont';
|
||||
import { typographySettingsStore } from '$features/AdjustTypography';
|
||||
import type { Snippet } from 'svelte';
|
||||
|
||||
interface LineChar {
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
- Performance optimized using offscreen canvas for measurements and transform-based animations.
|
||||
-->
|
||||
<script lang="ts">
|
||||
import { TypographyMenu } from '$features/SetupFont';
|
||||
import { typographySettingsStore } from '$features/SetupFont/model';
|
||||
import { TypographyMenu } from '$features/AdjustTypography';
|
||||
import { typographySettingsStore } from '$features/AdjustTypography/model';
|
||||
import {
|
||||
type ResponsiveManager,
|
||||
debounce,
|
||||
|
||||
Reference in New Issue
Block a user