import type React from "react"; // Editor primary color (themeable via --hf-accent). Applied through inline // style because CSS var() isn't valid in SVG presentation attributes. export const ACCENT = "var(--hf-accent, #3CE6AC)"; /** One path node: a diamond (matching the timeline keyframe), a wider transparent * grab target (when editable), and a hover-revealed × delete badge (when removable). */ export function MotionPathNode(props: { cx: number; cy: number; r: number; interactive: boolean; removable: boolean; grabbing: boolean; selected: boolean; onEnter: () => void; onLeave: () => void; onPointerDown: (e: React.PointerEvent) => void; onPointerMove: (e: React.PointerEvent) => void; onPointerUp: (e: React.PointerEvent) => void; onRemove: (e: React.PointerEvent) => void; onContextMenu?: (e: React.MouseEvent) => void; }) { const { cx, cy, r, interactive, removable, grabbing, selected } = props; const bx = cx + r * 1.8; const by = cy - r * 1.8; const k = r * 0.55; // Diamond matching the timeline keyframe (a 45°-rotated rounded square). // `side` is chosen so the diamond's points reach ~`r` from center, matching the // old dot's footprint; selection is shown by enlarging it (no extra shape). const side = (selected ? r * 1.5 : r) * 1.414; return ( {interactive && ( )} {removable && ( )} ); }