/** * @medicine-wheel/graph-viz — Interactive React Flow renderer * * `` is the interactive output strategy for the * Medicine Wheel relational web. It reuses the renderer-agnostic * `applyWheelLayout` to seed node positions, then hands control to React * Flow for drag / pan / zoom / minimap while preserving the four-direction * circular semantics (drawn by ``). * * Ship behind the `./interactive` subpath export. `@xyflow/react` is an * optional peer — static/server consumers importing from the package root * never pull it. * * The consumer is responsible for importing the React Flow stylesheet once * at the app level: `import '@xyflow/react/dist/style.css'`. */ import React from 'react'; import type { DirectionName, NodeType } from '@medicine-wheel/ontology-core'; import type { MWGraphData, MWGraphNode, MWGraphLink, MWGraphNodePositions, WheelLayoutConfig } from '../types.js'; export interface MedicineWheelFlowGraphProps { /** Graph data (nodes + links). Re-layout happens whenever this changes. */ data: MWGraphData; /** Layout configuration passed to `applyWheelLayout`. */ layout?: Partial; /** Canvas height (CSS). Width fills the container. Default: 600. */ height?: number | string; /** Dark mode styling. Default: true. */ darkMode?: boolean; /** Show node labels. Default: true. */ showNodeLabels?: boolean; /** Show OCAP® indicators. Default: true. */ showOcapIndicators?: boolean; /** Show Wilson alignment halos. Default: true. */ showWilsonHalos?: boolean; /** Show the four direction-quadrant backdrop. Default: true. */ showQuadrants?: boolean; /** Show direction labels (East/South/West/North + Ojibwe). Default: true. */ showDirectionLabels?: boolean; /** Show the minimap. Default: true. */ showMiniMap?: boolean; /** Show pan/zoom controls. Default: true. */ showControls?: boolean; /** Enable React Flow edge animation for ceremonied links. Default: true. */ animationsEnabled?: boolean; /** Custom CSS class on the wrapper. */ className?: string; /** Node positions to apply after the default layout seed. */ nodePositions?: MWGraphNodePositions; /** Fired when a node is clicked, with the original MWGraphNode. */ onNodeClick?: (node: MWGraphNode) => void; /** Fired when a node is double-clicked, with the original MWGraphNode. */ onNodeDoubleClick?: (node: MWGraphNode) => void; /** Fired when user-dragged node positions should be persisted. */ onNodePositionsChange?: (positions: MWGraphNodePositions) => void; /** * Enable weaving relations by dragging between nodes. Default: false. * The optimistic edge appears immediately; the consumer persists it via * `onRelationCreate` (and reloads `data` to canonicalize or revert). */ enableConnections?: boolean; /** Fired when a connection gesture completes between two nodes. */ onRelationCreate?: (sourceId: string, targetId: string) => void; /** Fired from the node menu's "Open node". Falls back to onNodeDoubleClick. */ onNodeOpen?: (node: MWGraphNode) => void; /** Fired from the pane menu's "Create node here" inline form. */ onNodeCreateRequest?: (request: { name: string; type: NodeType; direction?: DirectionName; position: { x: number; y: number; }; }) => void; /** Fired from the edge menu's "Honor ceremony". */ onEdgeCeremonyRequest?: (link: MWGraphLink) => void; /** Fired from the edge menu's confirmed "Release relation". */ onEdgeDeleteRequest?: (link: MWGraphLink) => void; /** * Ambient emphasis on one direction's beings (e.g. deep-link from the * home wheel via ?direction=). Hover emphasis takes precedence. */ highlightDirection?: DirectionName; /** * Radial snapping while dragging/nudging. Default: 'off'. * 'ring': beings stay in their band (direction ring / center heart). * 'sector': additionally, beings stay inside their direction quadrant. */ radialSnap?: 'off' | 'ring' | 'sector'; } /** * Interactive Medicine Wheel graph. Self-contained: wraps its own * `` so it is safe to mount anywhere (including via * `next/dynamic` with `ssr: false`). */ export declare function MedicineWheelFlowGraph(props: MedicineWheelFlowGraphProps): React.JSX.Element; //# sourceMappingURL=MedicineWheelFlowGraph.d.ts.map