Ontology Graph 01 - Cross-source semantic graph

v0.1.5

Interactive, draggable node graph of a pipeline's merged ontology: tables, columns and glossary terms clustered by domain, filterable by use case. Fully host-owned - the block only renders positions/selection/hover it derives from props and reports every interaction back through callbacks.

View as Markdown

Preview

Open full page ↗

Install & usage

npx shadcn@4.1.2 add @signalos/ontology-graph-01

Pulls the page source plus its widget dependencies (@signalos/tokens, @signalos/utils, @signalos/button, @signalos/badge, @signalos/tooltip, @signalos/split-panel, @signalos/page-header, @signalos/badge-list) into your app - you own the copy. Requires access.

usage
// after: npx shadcn@4.1.2 add @signalos/ontology-graph-01
// mount the pulled page in a route, e.g. src/app/ontology-graph/page.tsx
import OntologyGraph from "@/components/blocks/ontology-graph-01/OntologyGraph"

export default function Page() {
  return <OntologyGraph />
}

Props

OntologyNodeData

PropTypeDefaultDescription
label*string-
kind*string-
cluster*string-
color*string-
degree*number-
useCaseIds*string[]-
isDimmed*boolean-
isHovered*boolean-
isSelected*boolean-
sizePx*number-
fontSizePx*number-

UseCaseTreeNode

PropTypeDefaultDescription
id*string-
pipeline_id*string-
use_case_idstring | undefined-
parent_use_case_id*string | null-
title*string-
statement*string-
sourcestring | null | undefined-
status*SubUseCaseStatus-
derivation_basis*string[]-
hand_added*boolean-
review_originstring | null | undefined-
review_notestring | null | undefined-
created_atstring | null | undefined-
updated_atstring | null | undefined-
children*UseCaseTreeNode[]-

OntologyEdgeData

PropTypeDefaultDescription
kind*string-
isCrossSource*boolean-
detectionMethod*string-
useCaseIds*string[]-
isDimmed*boolean-

OntologyNodePropertiesLike

PropTypeDefaultDescription
domainstring | null | undefined-
business_purposestring | null | undefined-
column_countnumber | null | undefined-
definitionstring | null | undefined-
mapped_entitystring | null | undefined-
synonymsstring[] | null | undefined-
domain_contextstring | null | undefined-

OntologyNodeLike

PropTypeDefaultDescription
id*string-
label*string-
kind*string-
clusterstring | null | undefined-
connector_idstring | null | undefined-
use_case_idsstring[] | null | undefined-
tagsstring[] | null | undefined-
propertiesOntologyNodePropertiesLike | null | undefined-

OntologyEdgeLike

PropTypeDefaultDescription
id*string-
source*string-
target*string-
kind*string-
is_cross_sourceboolean | null | undefined-
detection_methodstring | null | undefined-
use_case_idsstring[] | null | undefined-

OntologyGraphSpecLike

PropTypeDefaultDescription
nodes*TNode[]-
edges*TEdge[]-
clustersstring[] | null | undefined-
connectorsstring[] | null | undefined-

OntologyUseCaseLike

PropTypeDefaultDescription
id*string-
title*string-
use_case_idstring | undefined-
childrenOntologyUseCaseLike[] | undefined-
descriptionstring | null | undefined-
statusstring | undefined-
sourcestring | null | undefined-

OntologyUseCaseOption

PropTypeDefaultDescription
id*string-
label*string-
hintstring | undefined-

OntologyInspectorRow

PropTypeDefaultDescription
label*string-
value*string-

OntologyInspectorConnection

PropTypeDefaultDescription
edgeId*string-
nodeId*string-
label*string-
direction*"incoming" | "outgoing"-
kind*string-

OntologyInspectorDetails

PropTypeDefaultDescription
node*TNode-
useCaseIds*string[]-
rows*OntologyInspectorRow[]-
connections*OntologyInspectorConnection[]-

OntologyUseCaseBadgesRenderProps

PropTypeDefaultDescription
useCases*TUseCase[]-

Supporting types

export type SubUseCaseStatus = "proposed" | "confirmed" | "rejected"
export type OntologyFlowNode = Node<OntologyNodeData>
export type OntologyFlowEdge = Edge<OntologyEdgeData>
export type OntologyUseCaseBadgesRenderer<
  TUseCase extends OntologyUseCaseLike = OntologyUseCaseLike,
> = (props: OntologyUseCaseBadgesRenderProps<TUseCase>) => ReactNode

Changelog

ontology-graph-01

0.1.5

  • renderUseCaseBadges's default now composes BadgeList instead of a hand-rolled Badge row, so the selected node's use cases pick up BadgeList's info-popover affordance and +N more overflow for free.

0.1.0

  • Initial release: a draggable, filterable ontology graph (@xyflow/react) composed from PageHeader and SplitPanel. All state that isn't pure view interaction — the spec, use-case filter options, glossary toggle, selection — is owned by the caller and passed in as props; drag position, hover, pan and zoom stay local to the canvas since they're not meaningful to persist.
  • Generic over the caller's node (TNode), edge (TEdge) and sub-use-case (TUseCase) shapes via the OntologyNodeLike / OntologyEdgeLike / OntologyUseCaseLike structural interfaces in OntologyGraph.types.ts — no domain types are imported.
  • renderUseCaseBadges is a content slot for the selected node's resolved use cases; it defaults to a plain Badge row so the block renders out of the box with zero required wiring.