import type { TemplateResult } from 'lit'; /** * Fixed geometry and renderer for the Human Design bodygraph. The diagram is a * standard, invariant layout: nine centers in canonical positions and shapes, * wired by 36 channels that each join two gates, with the 64 gates at fixed * points on the center edges, all overlaid on a front-facing human silhouette so * each center lands on the body part it governs. Only which centers are defined * and which channels and gates are active changes per chart, so this module holds * the geometry and the {@link RoxyBodygraph} component supplies the live state * from the /human-design/bodygraph response. * * @remarks Every point is authored in one normalized 0 to 100 canonical grid (x * left to right, y top to bottom) taken from the reference Jovian Archive * bodygraph, then scaled into {@link BODYGRAPH_VIEWBOX} by a single transform so * the chart and the body share one coordinate space and scale together. The grid * is sized so the nine centers fill the figure exactly as in the canonical * "nine centers on the human body" diagram: the Head center at the crown, Ajna at * the forehead, Throat at the neck, G at the chest, Heart at the right chest, * Spleen on the left torso, Solar Plexus on the right torso (its mirror), Sacral * at the lower abdomen, and Root at the pelvis. Two structural truths the layout * preserves: the Spleen (left) and the Solar Plexus (right) are mirror images at * the Sacral height, so the chart is narrow at the top and wide at the bottom; * and the Heart sits low and to the right of the G center, above the Solar * Plexus. The reference chart spreads the two side centers to the page edge for * channel clarity; here they are shifted inward by a fixed amount so they rest on * the torso sides inside the figure, with every channel topology preserved. Center shapes follow the canonical orientations (Head triangle * up, Ajna triangle down, Throat and Sacral and Root squares, G diamond, Heart * triangle pointing right, Spleen triangle pointing right with its base on the * far-left edge, Solar Plexus its mirror). The 36 channel gate pairs are the * gold-standard set used by the RoxyAPI Human Design engine. */ export type BodygraphCenterId = 'head' | 'ajna' | 'throat' | 'g' | 'heart' | 'sacral' | 'solar-plexus' | 'spleen' | 'root'; interface Point { x: number; y: number; } /** * One center's drawable geometry: its semantic traditional color, the polygon * point list of its canonical shape, and the anchor where its name label sits. * Shapes are explicit point lists so the triangle and diamond orientations match * the canonical diagram exactly. Label anchors sit in the empty margins outside * each shape so they never collide with the gate numbers printed on the edges. */ interface CenterGeometry { id: BodygraphCenterId; label: string; color: CenterColor; points: Point[]; labelAnchor: Point; labelAlign: 'start' | 'middle' | 'end'; } /** * Traditional Human Design center color group. A defined center is filled with * this semantic color (constant across light and dark, like chart data colors); * an open center is left transparent with a thin theme-aware outline. The four * groups mirror the canonical scheme: gold for the identity and inspiration * centers (Head, G), green for the mental awareness center (Ajna), red for the * life-force motors of will and vitality (Heart, Sacral), brown for the * pressure, expression, and remaining awareness centers (Throat, Spleen, Solar * Plexus, Root). */ export type CenterColor = 'gold' | 'green' | 'red' | 'brown'; /** * The viewBox-space gate anchors ({@link GATE_POINTS}) and the gate to center * index ({@link GATE_CENTER}). Exported so the geometry tests can assert the * layout invariants (side-center mirror symmetry, central-column balance, gates * inside their centers) without rendering. */ export declare const GATE_POINTS: Record, GATE_CENTER: Record; /** Horizontal axis of symmetry in viewBox units, the reflection axis for geometry tests. */ export declare const CHART_AXIS_X: number; /** * Center shapes in canonical orientation and color, labels anchored in the * margins. Central-column centers are built centered on {@link AXIS}; the Solar * Plexus shape is the Spleen reflected across the axis, so the side centers stay * exact mirrors. The Heart is the deliberate off-axis exception. */ export declare const CENTER_GEOMETRY: readonly CenterGeometry[]; /** * The 36 channels as ordered gate pairs. This is the canonical Human Design * channel set; a channel is active only when both of its gates are activated, * which the live response reports in its `channels` array. The static list lets * the renderer draw every channel as a hanging (inactive) line and overlay the * active ones, so an open bodygraph still shows its full wiring skeleton. */ export declare const CHANNEL_PAIRS: ReadonlyArray; export interface BodygraphRenderInput { definedCenters: Set; activeChannels: Set; activeGates: Set; gateTitles: Map; } /** Build the lookup key for an active channel from its two gate numbers. */ export declare function channelKey(a: number, b: number): string; export declare const BODYGRAPH_VIEWBOX = "0 0 472 472"; /** * Render the full bodygraph SVG inner content for the given live state. The * caller wraps it in an `` with {@link BODYGRAPH_VIEWBOX} and applies its * own theming CSS. Draw order: body silhouette under channels under centers * under gate numbers, so the body is the backdrop, the wiring sits behind the * shapes, and the numbers stay legible on top. */ export declare function renderBodygraphSvg(input: BodygraphRenderInput): TemplateResult; export {}; //# sourceMappingURL=bodygraph-render.d.ts.map