feat(swift): E0 Setup & Foundation + documentatie

Swift - Contextual UI EPD: "Van 12 klikken naar 1 zin"

Documentatie:
- PRD, FO, TO, UX specificaties
- Bouwplan met 6 epics, 27 stories (68 SP)
- Analyse en onderzoeksdocumenten

E0 Setup & Foundation:
- E0.S1: Zustand v5.0.9 geïnstalleerd
- E0.S2: Swift store met context, blocks, input state
- E0.S3: /epd/swift route met eigen layout (dark theme)
- E0.S4: Folder structuur components/swift/, lib/swift/

Components:
- CommandCenter (container)
- ContextBar (shift, patient)
- CommandInput (text + voice button)
- RecentStrip (laatste 5 acties)
- BlockContainer (wrapper voor blocks)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
colinislit
2025-12-23 22:28:41 +01:00
parent 96a1f25e55
commit 855b1e99ae
27 changed files with 8496 additions and 14 deletions

5
lib/swift/index.ts Normal file
View File

@@ -0,0 +1,5 @@
/**
* Swift Library Barrel Export
*/
export * from './types';

73
lib/swift/types.ts Normal file
View File

@@ -0,0 +1,73 @@
/**
* Swift Type Definitions
*
* Core types for the Swift Contextual UI system.
*/
import type { VerpleegkundigCategory } from '@/lib/types/report';
// Intent types
export type SwiftIntent = 'dagnotitie' | 'zoeken' | 'overdracht' | 'unknown';
export type BlockType = Exclude<SwiftIntent, 'unknown'>;
// Shift types
export type ShiftType = 'nacht' | 'ochtend' | 'middag' | 'avond';
// Intent classification result
export interface IntentClassificationResult {
intent: SwiftIntent;
confidence: number;
entities: ExtractedEntities;
source: 'local' | 'ai';
}
// Extracted entities from user input
export interface ExtractedEntities {
patientName?: string;
patientId?: string;
category?: VerpleegkundigCategory;
content?: string;
}
// Block sizes
export type BlockSize = 'sm' | 'md' | 'lg' | 'full';
// Block configuration
export interface BlockConfig {
type: BlockType;
title: string;
size: BlockSize;
icon: string;
}
// Block configs for each type
export const BLOCK_CONFIGS: Record<BlockType, BlockConfig> = {
dagnotitie: {
type: 'dagnotitie',
title: 'Dagnotitie',
size: 'md',
icon: 'FileText',
},
zoeken: {
type: 'zoeken',
title: 'Patiënt zoeken',
size: 'md',
icon: 'Search',
},
overdracht: {
type: 'overdracht',
title: 'Overdracht',
size: 'lg',
icon: 'ArrowRightLeft',
},
};
// Recent action type
export interface RecentAction {
id: string;
intent: SwiftIntent;
label: string;
timestamp: Date;
patientName?: string;
}