# Typed graph customization contracts
Bind graph input, options, output geometry, component props, styles, and simulation ownership to application records.

## APIs demonstrated

- [VizKey](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [Accessor](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [Bounds](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [Point](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [Style](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MarkStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [NodeStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [EdgeStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [LabelStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [FrameStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [LabelGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphData](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphNodeGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphRoute](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphEdgeGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphPresentation](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MarkInteraction](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphNodeProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphEdgeProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphLabelProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [GraphViewProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [DependencyStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [DependencyOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [DependencyGraphProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceSettings](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceNetworkController](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceNetworkProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceHookOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [HierarchyAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreeEdge](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreeNodeGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreeLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreeStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreeOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TidyTreeProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixData](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixCellGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [AdjacencyMatrixProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [MatrixCellProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyNodeGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyFlowGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [SankeyProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteData](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteEdgeGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [BipartiteGraphProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [PartitionAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [PartitionCellGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [PartitionLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [PartitionPresentation](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreemapStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreemapOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [TreemapProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [PartitionCellProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [NeighborhoodStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [NeighborhoodOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [NeighborhoodNodeGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [NeighborhoodLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [RadialNeighborhoodProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [IcicleStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [IcicleOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [IcicleProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordData](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordAccessors](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordArc](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordBandGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordRibbonGeometry](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordLayout](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordStyle](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordOptions](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ChordDiagramProps](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceSimulation](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [ForceSimulationFactory](/reference/components/graph-visualization/) from `@pibbl/core/viz`
- [Size](/reference/types/layout/) from `@pibbl/core/viz`

## Complete example

[Plain source](/minimal/viz/graph-contracts.ts). This example demonstrates a type-level or host-specific contract; it is checked with TypeScript rather than presented as an animated preview.

```ts
// Bind the public contracts to application records at your module boundary.
// Inputs/options configure calculations; immutable layouts feed custom marks;
// props/styles customize components without copying framework type definitions.
import type {
  VizKey,
  Accessor,
  Bounds,
  Point,
  Style,
  MarkStyle,
  NodeStyle,
  EdgeStyle,
  LabelStyle,
  FrameStyle,
  LabelGeometry,
  GraphData,
  GraphAccessors,
  GraphNodeGeometry,
  GraphRoute,
  GraphEdgeGeometry,
  GraphLayout,
  GraphPresentation,
  MarkInteraction,
  GraphNodeProps,
  GraphEdgeProps,
  GraphLabelProps,
  GraphViewProps,
  DependencyStyle,
  DependencyOptions,
  DependencyGraphProps,
  ForceSettings,
  ForceOptions,
  ForceLayout,
  ForceNetworkController,
  ForceStyle,
  ForceNetworkProps,
  ForceHookOptions,
  HierarchyAccessors,
  TreeEdge,
  TreeNodeGeometry,
  TreeLayout,
  TreeStyle,
  TreeOptions,
  TidyTreeProps,
  MatrixData,
  MatrixAccessors,
  MatrixCellGeometry,
  MatrixLayout,
  MatrixStyle,
  MatrixOptions,
  AdjacencyMatrixProps,
  MatrixCellProps,
  SankeyNodeGeometry,
  SankeyFlowGeometry,
  SankeyLayout,
  SankeyAccessors,
  SankeyStyle,
  SankeyOptions,
  SankeyProps,
  BipartiteData,
  BipartiteAccessors,
  BipartiteEdgeGeometry,
  BipartiteLayout,
  BipartiteStyle,
  BipartiteOptions,
  BipartiteGraphProps,
  PartitionAccessors,
  PartitionCellGeometry,
  PartitionLayout,
  PartitionPresentation,
  TreemapStyle,
  TreemapOptions,
  TreemapProps,
  PartitionCellProps,
  NeighborhoodStyle,
  NeighborhoodOptions,
  NeighborhoodNodeGeometry,
  NeighborhoodLayout,
  RadialNeighborhoodProps,
  IcicleStyle,
  IcicleOptions,
  IcicleProps,
  ChordData,
  ChordAccessors,
  ChordArc,
  ChordBandGeometry,
  ChordRibbonGeometry,
  ChordLayout,
  ChordStyle,
  ChordOptions,
  ChordDiagramProps,
  ForceSimulation,
  ForceSimulationFactory,
  Size,
} from "@pibbl/core/viz";
interface Delivery {
  id: string;
  name: string;
  from: string;
  to: string;
  amount: number;
  children?: Delivery[];
}
export interface DeliveryGraphContracts {
  readonly vizKey: VizKey;
  readonly accessor: Accessor<Delivery, string>;
  readonly bounds: Bounds;
  readonly point: Point;
  readonly style: Style<NodeStyle>;
  readonly markStyle: MarkStyle<GraphNodeGeometry<Delivery>, NodeStyle>;
  readonly nodeStyle: NodeStyle;
  readonly edgeStyle: EdgeStyle;
  readonly labelStyle: LabelStyle;
  readonly frameStyle: FrameStyle;
  readonly labelGeometry: LabelGeometry;
  readonly graphData: GraphData<Delivery, Delivery>;
  readonly graphAccessors: GraphAccessors<Delivery, Delivery>;
  readonly graphNodeGeometry: GraphNodeGeometry<Delivery>;
  readonly graphRoute: GraphRoute;
  readonly graphEdgeGeometry: GraphEdgeGeometry<Delivery>;
  readonly graphLayout: GraphLayout<Delivery, Delivery>;
  readonly graphPresentation: GraphPresentation<
    Delivery,
    Delivery,
    GraphNodeGeometry<Delivery>
  >;
  readonly markInteraction: MarkInteraction;
  readonly graphNodeProps: GraphNodeProps<Delivery>;
  readonly graphEdgeProps: GraphEdgeProps<Delivery>;
  readonly graphLabelProps: GraphLabelProps;
  readonly graphViewProps: GraphViewProps<Delivery, Delivery>;
  readonly dependencyStyle: DependencyStyle;
  readonly dependencyOptions: DependencyOptions<Delivery, Delivery>;
  readonly dependencyGraphProps: DependencyGraphProps<Delivery, Delivery>;
  readonly forceSettings: ForceSettings;
  readonly forceOptions: ForceOptions<Delivery, Delivery>;
  readonly forceLayout: ForceLayout<Delivery, Delivery>;
  readonly forceNetworkController: ForceNetworkController<Delivery, Delivery>;
  readonly forceStyle: ForceStyle;
  readonly forceNetworkProps: ForceNetworkProps<Delivery, Delivery>;
  readonly forceHookOptions: ForceHookOptions<Delivery, Delivery>;
  readonly hierarchyAccessors: HierarchyAccessors<Delivery>;
  readonly treeEdge: TreeEdge<Delivery>;
  readonly treeNodeGeometry: TreeNodeGeometry<Delivery>;
  readonly treeLayout: TreeLayout<Delivery>;
  readonly treeStyle: TreeStyle;
  readonly treeOptions: TreeOptions<Delivery>;
  readonly tidyTreeProps: TidyTreeProps<Delivery>;
  readonly matrixData: MatrixData<Delivery, Delivery, Delivery>;
  readonly matrixAccessors: MatrixAccessors<Delivery, Delivery, Delivery>;
  readonly matrixCellGeometry: MatrixCellGeometry<Delivery, Delivery, Delivery>;
  readonly matrixLayout: MatrixLayout<Delivery, Delivery, Delivery>;
  readonly matrixStyle: MatrixStyle;
  readonly matrixOptions: MatrixOptions<Delivery, Delivery, Delivery>;
  readonly adjacencyMatrixProps: AdjacencyMatrixProps<
    Delivery,
    Delivery,
    Delivery
  >;
  readonly matrixCellProps: MatrixCellProps<Delivery, Delivery, Delivery>;
  readonly sankeyNodeGeometry: SankeyNodeGeometry<Delivery>;
  readonly sankeyFlowGeometry: SankeyFlowGeometry<Delivery>;
  readonly sankeyLayout: SankeyLayout<Delivery, Delivery>;
  readonly sankeyAccessors: SankeyAccessors<Delivery, Delivery>;
  readonly sankeyStyle: SankeyStyle;
  readonly sankeyOptions: SankeyOptions<Delivery, Delivery>;
  readonly sankeyProps: SankeyProps<Delivery, Delivery>;
  readonly bipartiteData: BipartiteData<Delivery, Delivery, Delivery>;
  readonly bipartiteAccessors: BipartiteAccessors<Delivery, Delivery, Delivery>;
  readonly bipartiteEdgeGeometry: BipartiteEdgeGeometry<
    Delivery,
    Delivery,
    Delivery
  >;
  readonly bipartiteLayout: BipartiteLayout<Delivery, Delivery, Delivery>;
  readonly bipartiteStyle: BipartiteStyle;
  readonly bipartiteOptions: BipartiteOptions<Delivery, Delivery, Delivery>;
  readonly bipartiteGraphProps: BipartiteGraphProps<
    Delivery,
    Delivery,
    Delivery
  >;
  readonly partitionAccessors: PartitionAccessors<Delivery>;
  readonly partitionCellGeometry: PartitionCellGeometry<Delivery>;
  readonly partitionLayout: PartitionLayout<Delivery>;
  readonly partitionPresentation: PartitionPresentation<Delivery>;
  readonly treemapStyle: TreemapStyle;
  readonly treemapOptions: TreemapOptions<Delivery>;
  readonly treemapProps: TreemapProps<Delivery>;
  readonly partitionCellProps: PartitionCellProps<Delivery>;
  readonly neighborhoodStyle: NeighborhoodStyle;
  readonly neighborhoodOptions: NeighborhoodOptions<Delivery, Delivery>;
  readonly neighborhoodNodeGeometry: NeighborhoodNodeGeometry<Delivery>;
  readonly neighborhoodLayout: NeighborhoodLayout<Delivery, Delivery>;
  readonly radialNeighborhoodProps: RadialNeighborhoodProps<Delivery, Delivery>;
  readonly icicleStyle: IcicleStyle;
  readonly icicleOptions: IcicleOptions<Delivery>;
  readonly icicleProps: IcicleProps<Delivery>;
  readonly chordData: ChordData<Delivery, Delivery>;
  readonly chordAccessors: ChordAccessors<Delivery, Delivery>;
  readonly chordArc: ChordArc;
  readonly chordBandGeometry: ChordBandGeometry<Delivery>;
  readonly chordRibbonGeometry: ChordRibbonGeometry<Delivery>;
  readonly chordLayout: ChordLayout<Delivery, Delivery>;
  readonly chordStyle: ChordStyle;
  readonly chordOptions: ChordOptions<Delivery, Delivery>;
  readonly chordDiagramProps: ChordDiagramProps<Delivery, Delivery>;
  readonly forceSimulation: ForceSimulation<Delivery, Delivery>;
  readonly forceSimulationFactory: ForceSimulationFactory<Delivery, Delivery>;
  readonly size: Size;
}

```

## Usage notes



## Documentation version

Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.
