/** * @medicine-wheel/graph-viz — LineageWeb * * Episodes on a spine in chronicle order, each in its direction's band, with * the relations between them drawn as arcs: continuation above, relation * below. Pure SVG, no router and no CSS framework: colours come from the * `--mw-*` tokens (with fallbacks) or the `colors` prop, and opening an * episode is the caller's `onOpen`. * * Hover or select an episode to light its arcs. A tap selects, a second tap * opens. A search (`matches`) keeps the episodes related to what it found. * The options bar chooses the whole chronicle or the selected episode's * relatives, which kinds of relation to draw, and the thread chains. * jgwill/medicine-wheel#162. * * Moved and read by hand (#163): drag the empty canvas along time; zoom with * − + Fit, Ctrl/⌘ + wheel or a pinch, the moment under the pointer staying put; * hover or tap an arc for the words that say why the relation holds; ← → step * along time, ↑ ↓ choose a relation, Enter follows it or opens the episode, * Esc steps back. A new selection scrolls into view, and the band names stay * at the left edge. */ import React from 'react'; import { LINEAGE_BANDS, type LineageWebEdge, type LineageWebEpisode, type LineageWebLayoutConfig, type LineageWebView } from './lineage-web.js'; export interface LineageWebColors { east: string; south: string; west: string; north: string; /** Episodes with no direction. */ undirected: string; text: string; muted: string; border: string; /** The lit arcs, the active option, the selection ring. */ accent: string; /** The ground of the band names and the strip. */ panel: string; } export declare const DEFAULT_LINEAGE_WEB_COLORS: LineageWebColors; export interface LineageWebProps { /** In chronicle order, oldest first. */ episodes: LineageWebEpisode[]; edges: LineageWebEdge[]; /** The selected episode. Pass it to control the selection; leave it out to let the web hold it. */ selected?: string | null; onSelect?: (id: string | null) => void; /** A second tap on the selected episode, or Enter. */ onOpen?: (id: string) => void; /** The episodes a search matched, or null when nothing is typed. */ matches?: ReadonlySet | null; /** `kin` (default) keeps the matches and their relatives; `fade` dims what did not match. */ matchMode?: 'kin' | 'fade'; /** Pass it to control the view; leave it out to let the options bar hold it. */ view?: LineageWebView; defaultView?: Partial; onViewChange?: (view: LineageWebView) => void; /** The options bar above the canvas. Default true. */ controls?: boolean; /** The strip under the canvas naming the episode or relation in focus. Default true. */ chip?: boolean; colors?: Partial; /** Thread name → colour of its chain. */ threadColors?: Record; layout?: Partial; /** Where the canvas opens when it is wider than its box and nothing is selected. Default `start`. */ startAt?: 'start' | 'end'; /** Words for the band labels, e.g. `{ east: 'East · Waabinong' }`. */ bandLabels?: Partial>; /** Labels beside the dots. `auto` (default): all when 40 or fewer are drawn, else the episode in focus and its relatives. */ labels?: 'auto' | 'always' | 'never'; style?: React.CSSProperties; } export declare function LineageWeb({ episodes, edges, selected: selectedProp, onSelect, onOpen, matches, matchMode, view: viewProp, defaultView, onViewChange, controls, chip, colors: colorsProp, threadColors, layout: layoutProp, startAt, bandLabels, labels, style, }: LineageWebProps): React.JSX.Element; //# sourceMappingURL=LineageWeb.d.ts.map