Typed graph customization contracts
Bind graph input, options, output geometry, component props, styles, and simulation ownership to application records.
APIs demonstrated
Section titled “APIs demonstrated”- VizKey from
@pibbl/core/viz - Accessor from
@pibbl/core/viz - Bounds from
@pibbl/core/viz - Point from
@pibbl/core/viz - Style from
@pibbl/core/viz - MarkStyle from
@pibbl/core/viz - NodeStyle from
@pibbl/core/viz - EdgeStyle from
@pibbl/core/viz - LabelStyle from
@pibbl/core/viz - FrameStyle from
@pibbl/core/viz - LabelGeometry from
@pibbl/core/viz - GraphData from
@pibbl/core/viz - GraphAccessors from
@pibbl/core/viz - GraphNodeGeometry from
@pibbl/core/viz - GraphRoute from
@pibbl/core/viz - GraphEdgeGeometry from
@pibbl/core/viz - GraphLayout from
@pibbl/core/viz - GraphPresentation from
@pibbl/core/viz - MarkInteraction from
@pibbl/core/viz - GraphNodeProps from
@pibbl/core/viz - GraphEdgeProps from
@pibbl/core/viz - GraphLabelProps from
@pibbl/core/viz - GraphViewProps from
@pibbl/core/viz - DependencyStyle from
@pibbl/core/viz - DependencyOptions from
@pibbl/core/viz - DependencyGraphProps from
@pibbl/core/viz - ForceSettings from
@pibbl/core/viz - ForceOptions from
@pibbl/core/viz - ForceLayout from
@pibbl/core/viz - ForceNetworkController from
@pibbl/core/viz - ForceStyle from
@pibbl/core/viz - ForceNetworkProps from
@pibbl/core/viz - ForceHookOptions from
@pibbl/core/viz - HierarchyAccessors from
@pibbl/core/viz - TreeEdge from
@pibbl/core/viz - TreeNodeGeometry from
@pibbl/core/viz - TreeLayout from
@pibbl/core/viz - TreeStyle from
@pibbl/core/viz - TreeOptions from
@pibbl/core/viz - TidyTreeProps from
@pibbl/core/viz - MatrixData from
@pibbl/core/viz - MatrixAccessors from
@pibbl/core/viz - MatrixCellGeometry from
@pibbl/core/viz - MatrixLayout from
@pibbl/core/viz - MatrixStyle from
@pibbl/core/viz - MatrixOptions from
@pibbl/core/viz - AdjacencyMatrixProps from
@pibbl/core/viz - MatrixCellProps from
@pibbl/core/viz - SankeyNodeGeometry from
@pibbl/core/viz - SankeyFlowGeometry from
@pibbl/core/viz - SankeyLayout from
@pibbl/core/viz - SankeyAccessors from
@pibbl/core/viz - SankeyStyle from
@pibbl/core/viz - SankeyOptions from
@pibbl/core/viz - SankeyProps from
@pibbl/core/viz - BipartiteData from
@pibbl/core/viz - BipartiteAccessors from
@pibbl/core/viz - BipartiteEdgeGeometry from
@pibbl/core/viz - BipartiteLayout from
@pibbl/core/viz - BipartiteStyle from
@pibbl/core/viz - BipartiteOptions from
@pibbl/core/viz - BipartiteGraphProps from
@pibbl/core/viz - PartitionAccessors from
@pibbl/core/viz - PartitionCellGeometry from
@pibbl/core/viz - PartitionLayout from
@pibbl/core/viz - PartitionPresentation from
@pibbl/core/viz - TreemapStyle from
@pibbl/core/viz - TreemapOptions from
@pibbl/core/viz - TreemapProps from
@pibbl/core/viz - PartitionCellProps from
@pibbl/core/viz - NeighborhoodStyle from
@pibbl/core/viz - NeighborhoodOptions from
@pibbl/core/viz - NeighborhoodNodeGeometry from
@pibbl/core/viz - NeighborhoodLayout from
@pibbl/core/viz - RadialNeighborhoodProps from
@pibbl/core/viz - IcicleStyle from
@pibbl/core/viz - IcicleOptions from
@pibbl/core/viz - IcicleProps from
@pibbl/core/viz - ChordData from
@pibbl/core/viz - ChordAccessors from
@pibbl/core/viz - ChordArc from
@pibbl/core/viz - ChordBandGeometry from
@pibbl/core/viz - ChordRibbonGeometry from
@pibbl/core/viz - ChordLayout from
@pibbl/core/viz - ChordStyle from
@pibbl/core/viz - ChordOptions from
@pibbl/core/viz - ChordDiagramProps from
@pibbl/core/viz - ForceSimulation from
@pibbl/core/viz - ForceSimulationFactory from
@pibbl/core/viz - Size from
@pibbl/core/viz
Complete example
Section titled “Complete example”Plain source. This example demonstrates a type-level or host-specific contract; it is checked with TypeScript rather than presented as an animated preview.
// 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
Section titled “Usage notes”Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision a1dcf8e. ALPHA — NOT FOR PRODUCTION USE.