five-on-it / apps/client/src/ui/studio/edits
apps/client/src/ui/studio/edits
The studio's edits of a city spec, each a pure function from a spec to the next: elements added where the owner clicked (a road through its points, ending on the roads it starts or ends near; a roundabout; a hill; a district's seed; a park; a named place; a grid; a river; a prop in a park; a jetty on a river's bank), one replaced as the inspector or the JSON wrote it, one removed, one of its points moved, the spawn put on a road. A selection names an element by its list and index (Selection); selectionOfPath finds the element a solver's issue is about from its path (spec.roads[5].from.onto), and handlesOf the points of an element the map draws and drags. Names are made unique (road-3), as the spec wants them.