Refactor/reacrhitecture to fsd+ #49
-2
@@ -13,8 +13,6 @@ const CHAR_PROXIMITY_RANGE_PCT = 5;
|
||||
|
||||
/**
|
||||
* Default render size in px when callers omit the `size` arg on `layout()`.
|
||||
* Kept as a local constant to avoid pulling `$entities/Font` into
|
||||
* `$shared/lib` (would create an FSD-illegal upward import cycle).
|
||||
*/
|
||||
const DEFAULT_RENDER_SIZE_PX = 16;
|
||||
|
||||
+1
-1
@@ -1,4 +1,5 @@
|
||||
// @vitest-environment jsdom
|
||||
import { installCanvasMock } from '$shared/lib/helpers/__mocks__/canvas';
|
||||
import { clearCache } from '@chenglou/pretext';
|
||||
import {
|
||||
beforeEach,
|
||||
@@ -6,7 +7,6 @@ import {
|
||||
expect,
|
||||
it,
|
||||
} from 'vitest';
|
||||
import { installCanvasMock } from '../__mocks__/canvas';
|
||||
import { CharacterComparisonEngine } from './CharacterComparisonEngine.svelte';
|
||||
|
||||
// FontA: 10px per character. FontB: 15px per character.
|
||||
@@ -1,3 +1,9 @@
|
||||
export {
|
||||
CharacterComparisonEngine,
|
||||
type ComparisonLine,
|
||||
type ComparisonResult,
|
||||
} from './CharacterComparisonEngine/CharacterComparisonEngine.svelte';
|
||||
|
||||
export { getFontUrl } from './getFontUrl/getFontUrl';
|
||||
|
||||
// Mock data helpers for Storybook and testing
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
* - Virtual scrolling for large lists
|
||||
* - Debounced state for search inputs
|
||||
* - Entity stores with O(1) lookups
|
||||
* - Character-by-character font comparison
|
||||
* - Persistent localStorage-backed state
|
||||
* - Responsive breakpoint tracking
|
||||
* - 3D perspective animations
|
||||
@@ -116,24 +115,6 @@ export {
|
||||
type EntityStore,
|
||||
} from './createEntityStore/createEntityStore.svelte';
|
||||
|
||||
/**
|
||||
* Comparison logic
|
||||
*/
|
||||
export {
|
||||
/**
|
||||
* Character-by-character comparison utility
|
||||
*/
|
||||
CharacterComparisonEngine,
|
||||
/**
|
||||
* Single line of comparison results
|
||||
*/
|
||||
type ComparisonLine,
|
||||
/**
|
||||
* Full comparison output
|
||||
*/
|
||||
type ComparisonResult,
|
||||
} from './CharacterComparisonEngine/CharacterComparisonEngine.svelte';
|
||||
|
||||
/**
|
||||
* Text layout
|
||||
*/
|
||||
|
||||
@@ -5,9 +5,6 @@
|
||||
*/
|
||||
|
||||
export {
|
||||
CharacterComparisonEngine,
|
||||
type ComparisonLine,
|
||||
type ComparisonResult,
|
||||
type ControlDataModel,
|
||||
type ControlModel,
|
||||
createDebouncedState,
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
-->
|
||||
<script lang="ts">
|
||||
import {
|
||||
CharacterComparisonEngine,
|
||||
MULTIPLIER_L,
|
||||
MULTIPLIER_M,
|
||||
MULTIPLIER_S,
|
||||
@@ -20,9 +21,6 @@ import {
|
||||
debounce,
|
||||
} from '$shared/lib';
|
||||
import { cn } from '$shared/lib';
|
||||
import {
|
||||
CharacterComparisonEngine,
|
||||
} from '$shared/lib/helpers/CharacterComparisonEngine/CharacterComparisonEngine.svelte';
|
||||
import { Loader } from '$shared/ui';
|
||||
import { getContext } from 'svelte';
|
||||
import { Spring } from 'svelte/motion';
|
||||
|
||||
Reference in New Issue
Block a user