registry
@automindzsheets 01–77shadcn 4.x
SHEET 55

World Dots

lib / marketing

The planet both map items are drawn from: a one-degree land mask as a string constant, a flat sampler and a spherical one, the marker and route declaration, and the shared traffic clock — no npm dependency and nothing fetched.

type
lib
files
1
registry deps
none
npm deps
none

installs

  • lib/automindz/world-dots.ts

Installed on its own it draws nothing — it arrives as a dependency of @automindz/world-map and @automindz/globe, and **that is the point**: both of them read the same 64 800 bits, so the two drawings never disagree about where Italy is, and a city added here appears on both. It is its own item rather than a file each of them ships, because shadcn build inlines file *contents* — two items listing this path would put two snapshots of it in public/r, and a client installing both would get whichever one it installed last. Inside: the land mask (Natural Earth's 110m polygons scan-converted at author time, six cells per base64 character, decoded lazily and cached), the two samplers mapLand and sphereLand, the WorldMarker / WorldArc types with WORLD_MARKERS as a starting config, snapToLattice, and the clock. Nothing fetches and there is no topojson and no d3, so a map renders in a server component with no network. **Edit this file, not the components, and pass the result** — config has no default on either item. Markers are { lat, lng, label?, size?, id? } in ordinary WGS84 degrees, the pair you get out of a maps URL. Arcs address a marker by its id, or by its position in the array if it has none, and **the two are separate namespaces**: id: "0" and the marker standing at index 0 are two different markers and both are drawn. An arc that says "0" means the explicit id, because a position is only what you get when a marker has none — so give one of them a distinct id if you need to name both. Anything a resolver leaves out is in its skipped array with a reason, markers included: unknown-marker, self, duplicate, behind (the globe only), and duplicate-id for a second marker claiming an id the first took. Read it in development — a route that is not drawn is at least visibly missing, but a marker that is not drawn looks exactly like a place nobody declared. worldCycle() is the cadence cap both items are clamped by: it stretches the cycle until traffic finishes at 1.5Hz or slower, half of WCAG 2.3.1's three-flash threshold, in arithmetic rather than in a note. step is the dial for a page with several maps on it — degrees between dots, so the cost is quadratic in it.

Variations

one state per section

No previews for this item yet.