@trailvine/core
v1.0.0
Published
Framework-agnostic core for generating curved SVG timeline routes through a set of points. Zero runtime dependencies.
Downloads
15
Readme
@trailvine/core
Framework-agnostic engine for generating curved SVG timeline routes through a set of points. Zero runtime dependencies — pure functions only, no DOM, no styling, no I/O.
This is the low-level engine. Most people building with React or plain JS want @trailvine/react or @trailvine/vanilla instead — install this directly only if you're building your own binding, or just want the raw path/layout math.
Install
npm install @trailvine/coreUsage
import { buildTimelinePath, layoutTimelinePoints } from '@trailvine/core';
const points = layoutTimelinePoints(3, {
width: 700,
marginX: 20,
bands: [70, 20],
});
const d = buildTimelinePath(points, { curveType: 'elbow', radius: 8 });
// d is an SVG path `d` string, ready to drop into a <path> elementWhat's exported
buildTimelinePath (the main dispatcher), individual curve builders (buildElbowPath, buildStraightPath, buildSmoothPath, buildArcPath) and their *Segments variants, layoutTimelinePoints, generateBands, wrapText, validateTimelineInput, and every related type (TimelinePoint, LayoutOptions, PathOptions, WrapOptions, TrailvineOptions).
Full reference: trailvine.umbrova.com/docs/api/core
License
MIT
