Packages
@routess/core
Shared types, Zustand stores, and platform-agnostic utilities.
The foundation package. Everything safe for both web and React Native lives here.
Exports
| Subpath | Contents |
|---|---|
@routess/core | Re-exports of stores, types, utils, logger |
@routess/core/stores | Zustand stores: routing, auth, ui |
@routess/core/types | Shared TypeScript types |
@routess/core/utils | Geospatial helpers, formatters, validators |
Notable types
Coordinate:[lng, lat]tupleWaypoint:{ coord: Coordinate, type: 'routed' | 'direct', name?, timestamp? }RouteActivity:'run' | 'cycle' | 'walk'(with theROUTE_ACTIVITIESarray for runtime validation)RouteVisibility:'private' | 'unlisted' | 'public'(withROUTE_VISIBILITIES)RoutingPreferences:{ surfacePreference: SurfaceType, avoidFerries, avoidHighways }
Adding a new util
- Add the function in
src/utils/ - Re-export from
src/utils/index.ts - Add a unit test alongside it
- Bump nothing; the package is
workspace:*and not published
Adding a store
Stores live under src/stores/. Keep them framework-free: no React imports, no DOM. Use subscribeWithSelector if you need targeted subscribers.