fix: extract types from .svelte files for proper named re-exports

Svelte 5 .svelte modules only expose a default export, so 'export type { X } from "./X.svelte"' fails type-check. Move shared interfaces into adjacent .ts type files.

- shared-ui/navigation: SpotlightAction, ContentSearcher, ContentSearch{Result,Group} → types.ts
- shared-auth-ui: PasskeyManagerTranslations, TwoFactorSetupTranslations, SessionManagerTranslations → types.ts
- mana/web/page-carousel: CarouselPage → new types.ts
- mana/web: bump @vitest/* to 4.1.2 (matches lockfile)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-04-07 13:53:13 +02:00
parent fc743a494b
commit 440f6507f1
12 changed files with 143 additions and 135 deletions

View file

@ -1,43 +1,13 @@
<script lang="ts">
import type { PillAppItem } from './types';
import type {
PillAppItem,
SpotlightAction,
ContentSearchResult,
ContentSearchGroup,
ContentSearcher,
} from './types';
import { createAppNavigationStore } from './appNavigationStore.svelte';
export interface SpotlightAction {
id: string;
label: string;
description?: string;
icon?: string;
shortcut?: string;
category?: string;
onExecute: () => void;
}
export interface ContentSearchResult {
id: string;
type: string;
appId: string;
title: string;
subtitle?: string;
appIcon?: string;
appColor?: string;
href: string;
score: number;
matchedField?: string;
}
export interface ContentSearchGroup {
appId: string;
appName: string;
appIcon?: string;
appColor?: string;
results: ContentSearchResult[];
}
export type ContentSearcher = (
query: string,
signal: AbortSignal
) => Promise<ContentSearchGroup[]>;
interface Props {
open: boolean;
onClose: () => void;

View file

@ -6,12 +6,6 @@ export { default as PillNavigation } from './PillNavigation.svelte';
export { default as PillDropdown } from './PillDropdown.svelte';
export { default as AppDrawer } from './AppDrawer.svelte';
export { default as GlobalSpotlight } from './GlobalSpotlight.svelte';
export type {
SpotlightAction,
ContentSearcher,
ContentSearchResult,
ContentSearchGroup,
} from './GlobalSpotlight.svelte';
export { createGlobalSpotlightState } from './useGlobalSpotlight.svelte';
export {
createAppNavigationStore,
@ -49,4 +43,8 @@ export type {
PillTagSelectorConfig,
PillDivider,
PillNavElement,
SpotlightAction,
ContentSearchResult,
ContentSearchGroup,
ContentSearcher,
} from './types';

View file

@ -254,3 +254,38 @@ export interface NavLinkProps {
/** Additional CSS classes */
class?: string;
}
// ============ Global Spotlight Types ============
export interface SpotlightAction {
id: string;
label: string;
description?: string;
icon?: string;
shortcut?: string;
category?: string;
onExecute: () => void;
}
export interface ContentSearchResult {
id: string;
type: string;
appId: string;
title: string;
subtitle?: string;
appIcon?: string;
appColor?: string;
href: string;
score: number;
matchedField?: string;
}
export interface ContentSearchGroup {
appId: string;
appName: string;
appIcon?: string;
appColor?: string;
results: ContentSearchResult[];
}
export type ContentSearcher = (query: string, signal: AbortSignal) => Promise<ContentSearchGroup[]>;