glam/UML_VIEWER_FIX.md
kempersc 3ff0e33bf9 Add UML diagrams and scripts for custodian schema
- Created PlantUML diagrams for custodian types, full schema, legal status, and organizational structure.
- Implemented a script to generate GraphViz DOT diagrams from OWL/RDF ontology files.
- Developed a script to generate UML diagrams from modular LinkML schema, supporting both Mermaid and PlantUML formats.
- Enhanced class definitions and relationships in UML diagrams to reflect the latest schema updates.
2025-11-23 23:05:33 +01:00

40 lines
1.1 KiB
Markdown

# UML Viewer Module Export Fix
## Issue
```
The requested module '/src/components/uml/UMLVisualization.tsx' does not provide an export named 'UMLDiagram'
```
## Root Cause
TypeScript interfaces being imported with runtime `import` statement instead of `import type` statement.
## Solution
Changed import statement in `UMLParser.ts`:
**Before**:
```typescript
import { UMLDiagram, UMLNode, UMLLink } from './UMLVisualization';
```
**After**:
```typescript
import type { UMLDiagram, UMLNode, UMLLink } from './UMLVisualization';
```
## Why This Fixes It
- `UMLDiagram`, `UMLNode`, and `UMLLink` are TypeScript **interfaces** (type-only exports)
- Using `import type` tells TypeScript/Vite these are compile-time only imports
- Prevents Vite from looking for runtime exports that don't exist
## Files Modified
- `frontend/src/components/uml/UMLParser.ts` (line 1)
## Testing
1. Dev server is running on `http://localhost:5173`
2. Navigate to `/uml-viewer` route
3. Should now load without module export errors
## Next Steps
- Test the UML Viewer page loads correctly
- Verify schema diagram selection works
- Test zoom, pan, and node interactions