Frontend uudelleenrakennettu: Astro-komponentit, Wasm pääsäikeessä, ei Workeria

Vanha frontend siirretty temp/. Uusi rakenne:
- StatusBar.astro, Terminal.astro, Editor.astro, Guide.astro
- global.css erillinen
- Wasm pääsäikeessä (ei Worker — yksinkertainen, debugattava)
- Tab-completion, dropdown, projektikortti, Monaco, GUIDE.md
- Ei tokenisointia eikä koodilaboratoriota

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jaakko Vanhala
2026-04-09 20:17:39 +03:00
parent e3fdb91ac5
commit a8c4af0975
9617 changed files with 996171 additions and 5349 deletions

View File

@@ -0,0 +1,46 @@
import type { SSRManifest, SSRManifestI18n } from '../core/app/types.js';
import type { APIContext } from '../types/public/context.js';
/**
* Fallback routing decision types
*/
export type FallbackRouteResult = {
type: 'none';
} | {
type: 'redirect';
pathname: string;
} | {
type: 'rewrite';
pathname: string;
};
/**
* Options for computing fallback routes.
* Uses types from APIContext and SSRManifest to ensure type safety.
*/
export interface ComputeFallbackRouteOptions {
/** Pathname from url.pathname */
pathname: APIContext['url']['pathname'];
/** Response status code */
responseStatus: number;
/** Current locale from APIContext */
currentLocale: APIContext['currentLocale'];
/** Fallback configuration from i18n manifest */
fallback: NonNullable<SSRManifestI18n['fallback']>;
/** Fallback type from i18n manifest */
fallbackType: SSRManifestI18n['fallbackType'];
/** Locales from i18n manifest */
locales: SSRManifestI18n['locales'];
/** Default locale from i18n manifest */
defaultLocale: SSRManifestI18n['defaultLocale'];
/** Routing strategy from i18n manifest */
strategy: SSRManifestI18n['strategy'];
/** Base path from manifest */
base: SSRManifest['base'];
}
/**
* Compute fallback route for failed responses.
* Pure function - no APIContext, no Response objects, no URL objects.
*
* This function determines whether a failed request should be redirected or rewritten
* to a fallback locale based on the i18n configuration.
*/
export declare function computeFallbackRoute(options: ComputeFallbackRouteOptions): FallbackRouteResult;