/* * index.ts — the public API surface of @araharah/routing (D-01, D-03, D-07). * --------------------------------------------------------------------------- * Named exports ONLY (no default export). The package has NO exports / * main field (the @araharah/theme + @araharah/search precedent), so * consumers import the EXPLICIT SUBPATH WITH EXTENSION — * import { snapToGraph } from "@araharah/routing/src/index.ts"; * (both tsconfigs carry allowImportingTsExtensions + bundler resolution; * esbuild and Vite compile the .ts source; Node 24 type-stripping handles * the corpus runner's relative form). A bare "@araharah/routing" specifier * resolves to NOTHING — never use it. * * THE BACKEND LADDER (D-01 supersedes the phase-5 "wasm-router" note): * #1 "fixture" — createFixtureRoutingSource: the golden-pairs demo * corpus (15 committed KL pairs). * #2 "engine-a" — LIVE (plan 06-04): the Worker-side router built on * THIS package's data plane (decodeGraph + snapToGraph + * routeAstar over an R2-hosted CSR graph), consumed * client-side through createHttpRoutingSource (the * Bearer-gated POST /api/route seam). Engine B (a fully * client-side webview router — graph on the phone) is * engine A's documented post-v1 evolution (D-02). The * Valhalla-to-JS port was ruled infeasible and * geojson-path-finder rejected (demo-grade: no * alternatives/one-ways) — recorded so neither is ever * re-proposed (D-02). * Engine B remains the documented future rung; nothing else is planned. * * The module reads NO environment, NO secrets, and NO network (D-05/D-12): * the whole routing stack is V8-native and dependency-free — fixtures ride * the bundle, requests never leave the caller's frame. */ export type { RoutePoint, RouteRequest, RouteSummary, RouteStep, RouteGeometry, RouteOption, RouteResult, RoutingSource, FixturePair, FixtureRoute, } from "./types.ts"; export { decodePolyline6, encodePolyline6 } from "./polyline.ts"; export { haversineM, deriveCumulativeDistanceM } from "./geo.ts"; export { ORIGIN_TOLERANCE_M, createFixtureRoutingSource, getPairOrigin, getPairs, } from "./fixture-source.ts"; export { createHttpRoutingSource } from "./http-source.ts"; export type { HttpRoutingSourceOptions } from "./http-source.ts"; export type { RoadGraph, GraphEdgeInput, GraphInput } from "./graph.ts"; export { decodeGraph, encodeGraph, GRAPH_MAGIC, GRAPH_VERSION, UNNAMED_NAME_ID, } from "./graph.ts"; export type { SnapResult } from "./snap.ts"; export { snapToGraph, SNAP_BBOX_MARGIN_DEG } from "./snap.ts"; export type { AstarResult, GuidanceTurnKind } from "./astar.ts"; export { routeAstar, deriveSteps, classifyTurn, TURN_STRAIGHT_MAX_DEG, TURN_SLIGHT_MAX_DEG, TURN_UTURN_MIN_DEG, } from "./astar.ts";