Status-ring clusters with a worst-status badge, mode chips, doubt rings for estimated positions, the selected route done/ahead with off-route trail, and vehicle trails.
$ npx shadcn@latest add @highcommand/shipment-layerCopies the source into your project and pulls in what it needs (2 other items). First time? Add the registry to components.json.
Shipments as status-ring clusters (the ring split by status, exceptions first, the worst status as a badge) that open into round chips (glyph by mode, ring and badge by status: colour is never the only cue).
shipmentsrequiredreadonly MapShipmentPoint[]—Every shipment to draw, each with a position, status and mode (plus card fields).
selectedIdstring | nullnullThe open shipment: drawn on its own (never inside a cluster) with an accent ring.
onSelect(id: string) => void—A click on a shipment.
lensbooleanfalseThe exception lens: on-track shipments and clusters fade (still clickable).
linkedreadonly string[][]Shipments named elsewhere (a timeline column under the pointer), softly ringed.
renderCard(s: MapShipmentPoint) => ReactNodedefaultCardYour own card for a shipment (default ShipCard from its fields). Return null for none.
clusterMaxZoomnumber6Cluster below this zoom. Default 6.
<ClusterMembers />8 propsA cluster's members, worst first, read from the clustered source once the card shows (a cluster id holds for one zoom level).maprequiredMlMap—The MapLibre map that holds the clustered source.
sourcerequiredstring—Id of the clustered GeoJSON source to read the cluster's leaves from.
clusterIdrequirednumber—The cluster's id in that source (valid for the current zoom level only).
nrequirednumber—How many points the cluster holds.
countsrequiredRecord<StatusColor, number> | null—Members per status for the card's split line; null leaves the split out.
memberrequired(id: string) => (ClusterMember & { sev: number }) | null—A leaf's id as a card row (null to leave it out).
nounstring—What the cluster holds, as the card names it ("vehicles here").
ownboolean—True for your own vehicles: the card says so and its hint offers to list them instead of zooming in.
<SelectedRoute />3 propsThe selected route, done solid and ahead dashed, split where the shipment is now; a hovered shipment's route (`routes` holds it, the map's hover names it) dashed whole; a truck off its road, the way it has come since, dotted.routesrequiredreadonly MapRoute[]—The routes the map may draw (usually every shipment's); only the selected and the hovered ones show.
selectedIdstring | null—Id of the open shipment's route (a `routes` entry); that route draws done solid and ahead dashed.
roadsRoads | nullnullStored truck roads by road key (roadKeyOf).
<TrailsLayer />3 propsWhere moving road vehicles just were: a short trail (the last 7 places each was seen, a step of about 200 m apart) that fades toward the past.pointsrequiredreadonly TrailPoint[]—Where each moving vehicle is now (by `id`); a trail gains a place once its vehicle has moved about 200 m.
lengthnumber7Places kept per trail.
resetKeystring | number—A new value clears every trail.
idLookup<T extends { id: string; }>(list: () => readonly T[]): (id: string) => T | undefinedFinds a record by id, rebuilding its index only when `list()` returns a new array (a cluster card looks up every leaf).
Install this free piece now; the Pro pieces drop in on top of it, in the same app. Pro is $79 once.