2026-05-30 18:31:56 +03:00
|
|
|
import { createRouter } from 'sv-router';
|
|
|
|
|
import Home from './Home.svelte';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Single-page router for glyphdiff.
|
|
|
|
|
*
|
|
|
|
|
* Currently exposes one route; structure exists so additional routes can be
|
|
|
|
|
* added without touching the app shell.
|
|
|
|
|
*/
|
|
|
|
|
export const {
|
|
|
|
|
isActive,
|
|
|
|
|
navigate,
|
|
|
|
|
p,
|
|
|
|
|
preload,
|
|
|
|
|
route,
|
|
|
|
|
} = createRouter({
|
|
|
|
|
'/': Home,
|
|
|
|
|
/**
|
|
|
|
|
* Any unmatched path redirects to home until additional routes exist.
|
2026-06-02 23:02:07 +03:00
|
|
|
* Lazy-loaded so `router` doesn't statically import `Redirect`, which
|
|
|
|
|
* imports `navigate` from here — breaks the import cycle.
|
2026-05-30 18:31:56 +03:00
|
|
|
*/
|
2026-06-02 23:02:07 +03:00
|
|
|
'*notfound': () => import('./Redirect.svelte'),
|
2026-05-30 18:31:56 +03:00
|
|
|
});
|