feat(05-01): geo math + fixture RoutingSource backend + public API
- geo.ts: haversineM + deriveCumulativeDistanceM (D-07 snapped-progress field) - fixture-source.ts: backend #1 — ORIGIN_TOLERANCE_M=200 matching law, honest-null pending semantics (D-03), defensive pair skip at index build, lazy memoized index (LAW 1), static JSON import (LAW 2), zero logging/storage/network (LAW 3, D-12) - index.ts: named-export public surface, subpath-with-extension import law - loader proven in three environments (bare Node 24, esbuild, Vite-family)
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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 { createFixtureRoutingSource } 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 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";
|
||||
Reference in New Issue
Block a user