Skip to content

Component Interfaces

Document type: Product design specification (target state). Not a shipped feature list. See ROADMAP_MAPPING.md for release mapping and SHIPPED.md for what works today.

1. Purpose

This document defines implementation-facing TypeScript interfaces for core UI components.

2. Shared Types

export interface SemanticRef {
  id: string
  iri?: string
  label: string
  kind: SemanticKind
}

export type SemanticKind =
  | "class"
  | "individual"
  | "objectProperty"
  | "dataProperty"
  | "annotationProperty"
  | "ontology"
  | "query"
  | "diagnostic"

3. WorkspaceLayout

interface WorkspaceLayoutProps {
  workspaceId: string
  currentFocus?: SemanticRef
  layout: LayoutState
  onLayoutChange(layout: LayoutState): void
}

4. ExplorerTree

interface ExplorerTreeProps {
  roots: ExplorerNode[]
  selectedIds: string[]
  expandedIds: string[]
  onSelect(node: ExplorerNode): void
  onExpand(nodeId: string): void
  onContextMenu(node: ExplorerNode, event: MouseEvent): void
}

5. EntityEditor

interface EntityEditorProps {
  entityId: string
  activeTab: EntityEditorTab
  onTabChange(tab: EntityEditorTab): void
  onCommand(command: EntityCommand): void
}

6. InspectorCard

interface InspectorCardProps {
  title: string
  icon?: IconName
  status?: StatusKind
  actions?: Action[]
  children: React.ReactNode
}

7. SemanticGraph

interface SemanticGraphProps {
  nodes: GraphNode[]
  edges: GraphEdge[]
  selection: string[]
  layout: GraphLayout
  overlays: GraphOverlay[]
  onSelect(ref: SemanticRef): void
  onExpand(nodeId: string): void
}

8. QueryEditor

interface QueryEditorProps {
  language: QueryLanguage
  value: string
  schema: QuerySchema
  diagnostics: Diagnostic[]
  onChange(value: string): void
  onRun(): void
}

9. AIActionBar

interface AIActionBarProps {
  context: AIContext
  actions: AIAction[]
  onInvoke(action: AIAction): void
}

10. Extension Slots

interface ExtensionSlot<TProps> {
  id: string
  region: string
  render(props: TProps): React.ReactNode
}