Refactor/reacrhitecture to fsd+ #49

Merged
ilia merged 70 commits from refactor/reacrhitecture-to-fsd+ into main 2026-06-03 09:55:47 +00:00
8 changed files with 13 additions and 14 deletions
Showing only changes of commit c6c8497906 - Show all commits
+3 -2
View File
@@ -1,6 +1,5 @@
import { createRouter } from 'sv-router'; import { createRouter } from 'sv-router';
import Home from './Home.svelte'; import Home from './Home.svelte';
import Redirect from './Redirect.svelte';
/** /**
* Single-page router for glyphdiff. * Single-page router for glyphdiff.
@@ -18,6 +17,8 @@ export const {
'/': Home, '/': Home,
/** /**
* Any unmatched path redirects to home until additional routes exist. * Any unmatched path redirects to home until additional routes exist.
* Lazy-loaded so `router` doesn't statically import `Redirect`, which
* imports `navigate` from here — breaks the import cycle.
*/ */
'*notfound': Redirect, '*notfound': () => import('./Redirect.svelte'),
}); });
@@ -1,4 +1,4 @@
import { getDecimalPlaces } from '$shared/lib/utils'; import { getDecimalPlaces } from '../getDecimalPlaces/getDecimalPlaces';
/** /**
* Rounds a value to match the precision of a given step * Rounds a value to match the precision of a given step
@@ -5,13 +5,11 @@
--> -->
<script lang="ts"> <script lang="ts">
import { cn } from '$shared/lib'; import { cn } from '$shared/lib';
import {
Popover,
Slider,
} from '$shared/ui';
import { Button } from '$shared/ui/Button';
import MinusIcon from '@lucide/svelte/icons/minus'; import MinusIcon from '@lucide/svelte/icons/minus';
import PlusIcon from '@lucide/svelte/icons/plus'; import PlusIcon from '@lucide/svelte/icons/plus';
import { Button } from '../Button';
import Popover from '../Popover/Popover.svelte';
import Slider from '../Slider/Slider.svelte';
import TechText from '../TechText/TechText.svelte'; import TechText from '../TechText/TechText.svelte';
import type { import type {
ControlLabels, ControlLabels,
+2 -2
View File
@@ -5,8 +5,6 @@
<script lang="ts"> <script lang="ts">
import type { Filter } from '$shared/lib'; import type { Filter } from '$shared/lib';
import { cn } from '$shared/lib'; import { cn } from '$shared/lib';
import { Button } from '$shared/ui';
import { Label } from '$shared/ui';
import ChevronUpIcon from '@lucide/svelte/icons/chevron-up'; import ChevronUpIcon from '@lucide/svelte/icons/chevron-up';
import EllipsisIcon from '@lucide/svelte/icons/ellipsis'; import EllipsisIcon from '@lucide/svelte/icons/ellipsis';
import { cubicOut } from 'svelte/easing'; import { cubicOut } from 'svelte/easing';
@@ -14,6 +12,8 @@ import {
draw, draw,
fly, fly,
} from 'svelte/transition'; } from 'svelte/transition';
import { Button } from '../Button';
import Label from '../Label/Label.svelte';
interface Props { interface Props {
/** /**
+1 -1
View File
@@ -4,7 +4,7 @@
--> -->
<script lang="ts"> <script lang="ts">
import { cn } from '$shared/lib'; import { cn } from '$shared/lib';
import { Badge } from '$shared/ui'; import Badge from '../Badge/Badge.svelte';
interface Props { interface Props {
/** /**
@@ -4,7 +4,7 @@
--> -->
<script lang="ts"> <script lang="ts">
import { cn } from '$shared/lib'; import { cn } from '$shared/lib';
import { Label } from '$shared/ui'; import Label from '../../Label/Label.svelte';
interface Props { interface Props {
/** /**
+1 -1
View File
@@ -4,8 +4,8 @@
--> -->
<script lang="ts"> <script lang="ts">
import { cn } from '$shared/lib'; import { cn } from '$shared/lib';
import { Label } from '$shared/ui';
import type { ComponentProps } from 'svelte'; import type { ComponentProps } from 'svelte';
import Label from '../Label/Label.svelte';
interface Props extends Pick<ComponentProps<typeof Label>, 'variant'> { interface Props extends Pick<ComponentProps<typeof Label>, 'variant'> {
/** /**
+1 -1
View File
@@ -4,8 +4,8 @@
--> -->
<script lang="ts"> <script lang="ts">
import { cn } from '$shared/lib'; import { cn } from '$shared/lib';
import { Stat } from '$shared/ui';
import type { ComponentProps } from 'svelte'; import type { ComponentProps } from 'svelte';
import Stat from './Stat.svelte';
interface StatItem extends Partial<Pick<ComponentProps<typeof Stat>, 'variant'>> { interface StatItem extends Partial<Pick<ComponentProps<typeof Stat>, 'variant'>> {
label: string; label: string;