cursedbelt 5.92.3 → 5.94.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/react/components/ComboboxField.d.ts +10 -0
  2. package/dist/react/components/ComboboxField.d.ts.map +1 -1
  3. package/dist/react/components/ComboboxField.js +4 -4
  4. package/dist/react/components/ComboboxField.js.map +1 -1
  5. package/dist/react/components/CommentThread.d.ts +9 -3
  6. package/dist/react/components/CommentThread.d.ts.map +1 -1
  7. package/dist/react/components/CommentThread.js +25 -11
  8. package/dist/react/components/CommentThread.js.map +1 -1
  9. package/dist/react/components/VoiceNote.d.ts +20 -0
  10. package/dist/react/components/VoiceNote.d.ts.map +1 -0
  11. package/dist/react/components/VoiceNote.js +54 -0
  12. package/dist/react/components/VoiceNote.js.map +1 -0
  13. package/dist/react/components/VoiceRecorder.d.ts +35 -0
  14. package/dist/react/components/VoiceRecorder.d.ts.map +1 -0
  15. package/dist/react/components/VoiceRecorder.js +155 -0
  16. package/dist/react/components/VoiceRecorder.js.map +1 -0
  17. package/dist/react/index.d.ts +2 -0
  18. package/dist/react/index.d.ts.map +1 -1
  19. package/dist/react/index.js +2 -0
  20. package/dist/react/index.js.map +1 -1
  21. package/dist/react/map-frame/MapFrame.d.ts +219 -0
  22. package/dist/react/map-frame/MapFrame.d.ts.map +1 -0
  23. package/dist/react/map-frame/MapFrame.js +726 -0
  24. package/dist/react/map-frame/MapFrame.js.map +1 -0
  25. package/dist/react/map-frame/geo.d.ts +210 -0
  26. package/dist/react/map-frame/geo.d.ts.map +1 -0
  27. package/dist/react/map-frame/geo.js +345 -0
  28. package/dist/react/map-frame/geo.js.map +1 -0
  29. package/dist/react/map-frame/index.d.ts +5 -0
  30. package/dist/react/map-frame/index.d.ts.map +1 -0
  31. package/dist/react/map-frame/index.js +3 -0
  32. package/dist/react/map-frame/index.js.map +1 -0
  33. package/dist/styles-areas/canvas-hud.css +5 -5
  34. package/dist/styles-areas/workbench.css +17 -17
  35. package/package.json +13 -1
  36. package/scripts/guardrails-baseline.json +1 -1
  37. package/scripts/styleAreas.ts +1 -1
  38. package/src/react/components/ComboboxField.spec.tsx +39 -0
  39. package/src/react/components/ComboboxField.tsx +20 -4
  40. package/src/react/components/CommentThread.spec.tsx +25 -0
  41. package/src/react/components/CommentThread.tsx +60 -10
  42. package/src/react/components/VoiceNote.tsx +92 -0
  43. package/src/react/components/VoiceRecorder.spec.tsx +116 -0
  44. package/src/react/components/VoiceRecorder.tsx +224 -0
  45. package/src/react/index.ts +9 -0
  46. package/src/react/map-frame/MapFrame.spec.ts +168 -0
  47. package/src/react/map-frame/MapFrame.tsx +954 -0
  48. package/src/react/map-frame/geo.spec.ts +393 -0
  49. package/src/react/map-frame/geo.ts +421 -0
  50. package/src/react/map-frame/index.ts +34 -0
  51. package/src/react/media/HoverScrubVideoThumb.spec.tsx +4 -0
  52. package/src/styles-areas/canvas-hud.css +5 -5
  53. package/src/styles-areas/workbench.css +17 -17
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MapFrame.js","sourceRoot":"","sources":["../../../src/react/map-frame/MapFrame.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuHG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEN,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EAET,cAAc,GACd,MAAM,UAAU,CAAC;AAElB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAC;AAC9B,MAAM,CAAC,MAAM,WAAW,GAAG,GAAG,CAAC;AAE/B;;;;;;;;;;;GAWG;AACH,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB;;;;;;;;GAQG;AACH,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IAAI,GAAI,IACnB,IACD,CACN,CAAC;AACH,CAAC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,8GAA8G;AAC9G,MAAM,QAAQ,GAAG,GAAG,CAAC;AAErB,SAAS,QAAQ,CAAC,EAAE,IAAI,EAAsB;IAC7C,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3B,8EAA8E;IAC9E,wEAAwE;IACxE,IAAI,GAAG,CAAC,UAAU,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACrC,MAAM,IAAI,GAAG,EAAE,CAAC;IAChB,MAAM,MAAM,GAAG,WAAW,GAAG,EAAE,CAAC;IAChC,OAAO,CAQN,4BAAe,WAAW,aAGzB,eACC,CAAC,EAAE,IAAI,GAAG,CAAC,EACX,CAAC,EAAE,MAAM,GAAG,EAAE,EACd,KAAK,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,UAAU,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,EACjE,MAAM,EAAE,EAAE,EACV,EAAE,EAAE,CAAC,EACL,IAAI,EAAC,aAAa,EAClB,OAAO,EAAE,IAAI,GACZ,EACF,eACC,CAAC,EAAE,IAAI,IAAI,IAAI,MAAM,GAAG,CAAC,QAAQ,GAAG,CAAC,UAAU,MAAM,EACrD,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,mBAAmB,EAC1B,WAAW,EAAE,GAAG,GACf,EACF,eACC,CAAC,EAAE,IAAI,EACP,CAAC,EAAE,MAAM,GAAG,CAAC,EACb,QAAQ,EAAE,EAAE,EACZ,IAAI,EAAC,mBAAmB,YAEvB,GAAG,CAAC,KAAK,GACJ,IACJ,CACJ,CAAC;AACH,CAAC"}
@@ -0,0 +1,210 @@
1
+ /**
2
+ * cursedbelt/react/map-frame/geo — places as geometry: pure, no React, no DOM, no network.
3
+ *
4
+ * Lifted from apps/family's `shared/geo.ts` (forge task 3700) so that every map in the fleet
5
+ * projects with ONE formula. Its own leaf, so a server that only wants `haversineKm` never
6
+ * pulls in the frame.
7
+ *
8
+ * ── Why Web Mercator, specifically ──────────────────────────────────────────
9
+ * Because the imagery underneath is Google's, and Google Static Maps renders Web
10
+ * Mercator at 256px tiles. An overlay has to use the SAME projection or every pin
11
+ * drifts from the coastline it is supposed to sit on — and it would drift more the
12
+ * further from the equator. `project` below is Google's own formula, not an
13
+ * approximation of it.
14
+ */
15
+ export interface LatLng {
16
+ lat: number;
17
+ lng: number;
18
+ }
19
+ /** A rectangle on the earth, as two corners. */
20
+ export interface Bounds {
21
+ south: number;
22
+ west: number;
23
+ north: number;
24
+ east: number;
25
+ }
26
+ /**
27
+ * Latitude beyond which Web Mercator stops being drawable — the projection sends
28
+ * the poles to infinity, so every implementation clamps, and ours must clamp to
29
+ * the SAME value Google's does or a Reykjavík pin lands off the image.
30
+ */
31
+ export declare const MERCATOR_MAX_LAT = 85.05112878;
32
+ /**
33
+ * A lat/lng as a fraction of the whole world square, both in 0–1.
34
+ *
35
+ * Splitting this out from pixels is what lets the same math serve a 640×360
36
+ * static map, a full-bleed SVG and a 60px thumbnail without three copies of the
37
+ * formula.
38
+ */
39
+ export declare function worldFraction(point: LatLng): {
40
+ x: number;
41
+ y: number;
42
+ };
43
+ /** The inverse of `worldFraction` — a point on the image back to the earth. Used
44
+ * when a drag or a click has to mean a place rather than a pixel. */
45
+ export declare function fromWorldFraction(fraction: {
46
+ x: number;
47
+ y: number;
48
+ }): LatLng;
49
+ /** A viewport: what a static-map image of this size, centered here, at this zoom,
50
+ * actually covers. One object so a component can never pass a mismatched
51
+ * center/zoom pair to the projector and the image loader. */
52
+ export interface Viewport {
53
+ center: LatLng;
54
+ /** Google's integer zoom levels. Kept integral on purpose — see `snapZoom`. */
55
+ zoom: number;
56
+ width: number;
57
+ height: number;
58
+ }
59
+ /**
60
+ * Where a point lands inside a viewport, in image pixels.
61
+ *
62
+ * Returns coordinates even when they fall outside the image; clipping is the
63
+ * caller's decision, and a pin just off the edge is what an arc needs to leave
64
+ * the frame in the right direction.
65
+ */
66
+ export declare function project(point: LatLng, view: Viewport): {
67
+ x: number;
68
+ y: number;
69
+ };
70
+ /** A pixel inside the viewport, back to the earth. */
71
+ export declare function unproject(pixel: {
72
+ x: number;
73
+ y: number;
74
+ }, view: Viewport): LatLng;
75
+ /** The box that contains every point, or null for none. */
76
+ export declare function boundsOf(points: LatLng[]): Bounds | null;
77
+ export declare const centerOf: (bounds: Bounds) => LatLng;
78
+ /**
79
+ * The largest INTEGER zoom at which every point still fits.
80
+ *
81
+ * 🔴 Integer, and that is a cost decision as much as a visual one. Every distinct
82
+ * (center, zoom, size) is a separate billable Static Maps render and a separate
83
+ * cache entry; a continuous zoom would mint a new image on every pixel of a pinch
84
+ * gesture. Snapping to the levels Google tiles at means a family of a few hundred
85
+ * places has a few dozen possible views, all of which are on disk after the first
86
+ * visit. `padding` keeps a pin off the frame edge, where half of it would be cut.
87
+ */
88
+ export declare function zoomToFit(bounds: Bounds, size: {
89
+ width: number;
90
+ height: number;
91
+ }, options?: {
92
+ padding?: number;
93
+ maxZoom?: number;
94
+ minZoom?: number;
95
+ }): number;
96
+ /** Keep a zoom on the levels Google tiles at, within the app's range. */
97
+ export declare const snapZoom: (zoom: number, min?: number, max?: number) => number;
98
+ /** The app's zoom range, in one place. Exported because a gesture has to clamp to
99
+ * the same bounds `snapZoom` will land on, or a pinch runs away past the last
100
+ * level Google renders and springs back when it commits. */
101
+ export declare const MIN_ZOOM = 1;
102
+ export declare const MAX_ZOOM = 16;
103
+ /**
104
+ * The center that keeps one pixel over the same ground while the zoom changes.
105
+ *
106
+ * 🔴 This is what separates a map gesture from a magnifier. Zooming about the
107
+ * frame's center — which is what a naive `zoom + 1` does — means the place the
108
+ * reader is pointing at slides away exactly as they close in on it, so they
109
+ * overshoot, correct, overshoot again. Anchoring at the cursor (or at the midpoint
110
+ * between two pinching fingers) is the behavior every map has, and the reason it
111
+ * is arithmetic rather than a feeling is that it is easy to get subtly wrong: the
112
+ * error is zero at the center and grows toward the edges, so it looks fine in
113
+ * exactly the place a developer tests it.
114
+ *
115
+ * `nextZoom` may be FRACTIONAL. A live gesture runs continuously and only the
116
+ * committed value is snapped — see `MapFrame`.
117
+ *
118
+ * `landsAt` defaults to `pixel` — "hold this spot still", which is a wheel. Pass a
119
+ * different pixel and the ground under `pixel` is carried to `landsAt` instead,
120
+ * which is a PINCH: two fingers that spread and slide at once are asking to zoom
121
+ * and pan in one gesture, and doing them as separate steps makes the map lurch.
122
+ */
123
+ export declare function zoomAnchoredAt(view: Viewport, pixel: {
124
+ x: number;
125
+ y: number;
126
+ }, nextZoom: number, landsAt?: {
127
+ x: number;
128
+ y: number;
129
+ }): LatLng;
130
+ /** Anything the clusterer can place: an identity, a position and a magnitude. */
131
+ export interface Clusterable {
132
+ id: string;
133
+ point: LatLng;
134
+ weight: number;
135
+ }
136
+ /** One or more items that overlap on screen at the current viewport. */
137
+ export interface Cluster<T extends Clusterable> {
138
+ /** The heaviest member's id — stable across a re-cluster at the same zoom, so
139
+ * React keys and a hover state survive a refetch. */
140
+ id: string;
141
+ /** Where the token is drawn: the weighted center of its members. */
142
+ point: LatLng;
143
+ members: T[];
144
+ /** Sum of the members' weights — how many PEOPLE the token stands for, which
145
+ * is the number worth showing, not how many pins it swallowed. */
146
+ weight: number;
147
+ }
148
+ /**
149
+ * Group items that would overlap into one token, at this viewport.
150
+ *
151
+ * 🔴 The problem this solves is visible in the owner's own screenshot: at the zoom
152
+ * that fits the family, forty European pins land inside one degree and print as a
153
+ * single unreadable blob of circles — the map is densest exactly where the family
154
+ * is, which is the worst possible failure mode for a family atlas. Every mapping
155
+ * stack ships a clusterer (Supercluster, Leaflet.markercluster) for this; ours is
156
+ * forty lines because our n is a few hundred places, not a few hundred thousand
157
+ * points, so the quadratic pass is far below a frame budget and needs no index.
158
+ *
159
+ * **Greedy by weight, and that ordering is the whole design.** The heaviest place
160
+ * always seeds its cluster, so the token sits on Windsor rather than drifting onto
161
+ * whichever hamlet happened to be first in the array — and the result is
162
+ * deterministic, which is what lets a test pin it and a hover survive the atlas's
163
+ * 1.5 s refetch. Ties break on id for the same reason.
164
+ *
165
+ * `radiusPx` is in VIEWPORT units (the fixed 640×400 logical frame), not CSS
166
+ * pixels, because that is the space the overlay is drawn in.
167
+ */
168
+ export declare function clusterByScreen<T extends Clusterable>(items: readonly T[], view: Viewport, radiusPx: number): Cluster<T>[];
169
+ /**
170
+ * Great-circle distance in kilometers.
171
+ *
172
+ * Straight-line, not travel time. A road distance between a 2026 address and an
173
+ * 1889 village is a fiction — there may be an ocean and there was certainly no
174
+ * road — so the honest number is "how far apart these two points are", and it
175
+ * costs no API call.
176
+ */
177
+ export declare function haversineKm(a: LatLng, b: LatLng): number;
178
+ /** "4,380 miles · 7,050 km" — both, because the family spans two countries that
179
+ * do not agree, and picking one for everybody is worse than showing eight extra
180
+ * characters. Rounded to something a person would say out loud. */
181
+ export declare function formatDistance(km: number): string;
182
+ /**
183
+ * The DISTANCE KEY — how far one bar on the map actually is.
184
+ *
185
+ * The owner's ask, on the atlas: *"a distance key on maps so I can tell what a
186
+ * mile looks like."* Every other mark on this map is a family record; the one
187
+ * thing missing was the scale those records are spread over, so a reader could
188
+ * not tell whether two pins were in one parish or two counties.
189
+ *
190
+ * ── 🔴 It costs NOTHING, and that is why it is pure arithmetic here ──────────
191
+ * Google's own Static Maps renders can carry no scale bar, and asking for one
192
+ * would be a different render. The ground resolution of a Web Mercator viewport
193
+ * is a closed form — {@link EQUATOR_METRES} of world at zoom 0 across
194
+ * `TILE_SIZE` pixels, narrowed by `cos(latitude)` — so the bar is derived from
195
+ * the viewport this app already committed to, with no call and no image.
196
+ *
197
+ * ── 🔴 Miles FIRST, kilometers beside it ────────────────────────────────────
198
+ * The same split {@link formatDistance} makes, and for the same reason: the
199
+ * family lives in Texas and the records are English and German. A bar labeled
200
+ * in one unit makes half the readers do arithmetic to read a map.
201
+ *
202
+ * The chosen distance is the largest of the 1/2/5 series that still fits inside
203
+ * `maxUnits` — the convention every map uses, because "1 mi" and "2 mi" are
204
+ * distances a person holds in their head and "1.37 mi" is not.
205
+ */
206
+ export declare function scaleBar(view: Viewport, maxUnits?: number): {
207
+ widthUnits: number;
208
+ label: string;
209
+ };
210
+ //# sourceMappingURL=geo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo.d.ts","sourceRoot":"","sources":["../../../src/react/map-frame/geo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,WAAW,MAAM;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACZ;AAED,gDAAgD;AAChD,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb;AAKD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,cAAc,CAAC;AAK5C;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CASrE;AAED;sEACsE;AACtE,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAK5E;AAED;;8DAE8D;AAC9D,MAAM,WAAW,QAAQ;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAQ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,CAAC;CACf;AAED,wEAAwE;AACxE,MAAM,WAAW,OAAO,CAAC,CAAC,SAAS,WAAW;IAC7C;0DACsD;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,oEAAoE;IACpE,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,CAAC,EAAE,CAAC;IACb;uEACmE;IACnE,MAAM,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,WAAW,EACpD,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,IAAI,EAAE,QAAQ,EACd,QAAQ,EAAE,MAAM,GACd,OAAO,CAAC,CAAC,CAAC,EAAE,CAoCd;AA6BD;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAQxD;AAID;;oEAEoE;AACpE,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,QAAQ,SAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAoB9F"}
@@ -0,0 +1,345 @@
1
+ /**
2
+ * cursedbelt/react/map-frame/geo — places as geometry: pure, no React, no DOM, no network.
3
+ *
4
+ * Lifted from apps/family's `shared/geo.ts` (forge task 3700) so that every map in the fleet
5
+ * projects with ONE formula. Its own leaf, so a server that only wants `haversineKm` never
6
+ * pulls in the frame.
7
+ *
8
+ * ── Why Web Mercator, specifically ──────────────────────────────────────────
9
+ * Because the imagery underneath is Google's, and Google Static Maps renders Web
10
+ * Mercator at 256px tiles. An overlay has to use the SAME projection or every pin
11
+ * drifts from the coastline it is supposed to sit on — and it would drift more the
12
+ * further from the equator. `project` below is Google's own formula, not an
13
+ * approximation of it.
14
+ */
15
+ /** How the world looks at zoom 0: one 256px tile, edge to edge. */
16
+ const TILE_SIZE = 256;
17
+ /**
18
+ * Latitude beyond which Web Mercator stops being drawable — the projection sends
19
+ * the poles to infinity, so every implementation clamps, and ours must clamp to
20
+ * the SAME value Google's does or a Reykjavík pin lands off the image.
21
+ */
22
+ export const MERCATOR_MAX_LAT = 85.05112878;
23
+ const clamp = (value, low, high) => Math.min(high, Math.max(low, value));
24
+ /**
25
+ * A lat/lng as a fraction of the whole world square, both in 0–1.
26
+ *
27
+ * Splitting this out from pixels is what lets the same math serve a 640×360
28
+ * static map, a full-bleed SVG and a 60px thumbnail without three copies of the
29
+ * formula.
30
+ */
31
+ export function worldFraction(point) {
32
+ const lat = clamp(point.lat, -MERCATOR_MAX_LAT, MERCATOR_MAX_LAT);
33
+ const sin = Math.sin((lat * Math.PI) / 180);
34
+ return {
35
+ x: (point.lng + 180) / 360,
36
+ // The Mercator y. `0.5 - ln((1+sin)/(1-sin)) / (4π)` is the closed form of
37
+ // Google's own projection; north is a SMALLER y because screen y grows down.
38
+ y: 0.5 - Math.log((1 + sin) / (1 - sin)) / (4 * Math.PI),
39
+ };
40
+ }
41
+ /** The inverse of `worldFraction` — a point on the image back to the earth. Used
42
+ * when a drag or a click has to mean a place rather than a pixel. */
43
+ export function fromWorldFraction(fraction) {
44
+ const lng = fraction.x * 360 - 180;
45
+ const n = Math.PI * (1 - 2 * fraction.y);
46
+ const lat = (180 / Math.PI) * Math.atan(Math.sinh(n));
47
+ return { lat, lng };
48
+ }
49
+ /**
50
+ * Where a point lands inside a viewport, in image pixels.
51
+ *
52
+ * Returns coordinates even when they fall outside the image; clipping is the
53
+ * caller's decision, and a pin just off the edge is what an arc needs to leave
54
+ * the frame in the right direction.
55
+ */
56
+ export function project(point, view) {
57
+ const scale = TILE_SIZE * 2 ** view.zoom;
58
+ const p = worldFraction(point);
59
+ const c = worldFraction(view.center);
60
+ return {
61
+ x: (p.x - c.x) * scale + view.width / 2,
62
+ y: (p.y - c.y) * scale + view.height / 2,
63
+ };
64
+ }
65
+ /** A pixel inside the viewport, back to the earth. */
66
+ export function unproject(pixel, view) {
67
+ const scale = TILE_SIZE * 2 ** view.zoom;
68
+ const c = worldFraction(view.center);
69
+ return fromWorldFraction({
70
+ x: c.x + (pixel.x - view.width / 2) / scale,
71
+ y: c.y + (pixel.y - view.height / 2) / scale,
72
+ });
73
+ }
74
+ /** The box that contains every point, or null for none. */
75
+ export function boundsOf(points) {
76
+ if (points.length === 0)
77
+ return null;
78
+ let south = 90;
79
+ let north = -90;
80
+ let west = 180;
81
+ let east = -180;
82
+ for (const point of points) {
83
+ south = Math.min(south, point.lat);
84
+ north = Math.max(north, point.lat);
85
+ west = Math.min(west, point.lng);
86
+ east = Math.max(east, point.lng);
87
+ }
88
+ return { south, west, north, east };
89
+ }
90
+ export const centerOf = (bounds) => ({
91
+ lat: (bounds.south + bounds.north) / 2,
92
+ lng: (bounds.west + bounds.east) / 2,
93
+ });
94
+ /**
95
+ * The largest INTEGER zoom at which every point still fits.
96
+ *
97
+ * 🔴 Integer, and that is a cost decision as much as a visual one. Every distinct
98
+ * (center, zoom, size) is a separate billable Static Maps render and a separate
99
+ * cache entry; a continuous zoom would mint a new image on every pixel of a pinch
100
+ * gesture. Snapping to the levels Google tiles at means a family of a few hundred
101
+ * places has a few dozen possible views, all of which are on disk after the first
102
+ * visit. `padding` keeps a pin off the frame edge, where half of it would be cut.
103
+ */
104
+ export function zoomToFit(bounds, size, options = {}) {
105
+ const padding = options.padding ?? 48;
106
+ const maxZoom = options.maxZoom ?? 12;
107
+ const minZoom = options.minZoom ?? 1;
108
+ const usableWidth = Math.max(32, size.width - padding * 2);
109
+ const usableHeight = Math.max(32, size.height - padding * 2);
110
+ const sw = worldFraction({ lat: bounds.south, lng: bounds.west });
111
+ const ne = worldFraction({ lat: bounds.north, lng: bounds.east });
112
+ // A single point (or a row of points on one line) has zero extent in that
113
+ // axis; treating that as "fits at any zoom" is right, so it falls out of the
114
+ // Infinity rather than being special-cased into a divide by zero.
115
+ const spanX = Math.abs(ne.x - sw.x);
116
+ const spanY = Math.abs(sw.y - ne.y);
117
+ const zoomX = spanX > 0 ? Math.log2(usableWidth / (TILE_SIZE * spanX)) : Number.POSITIVE_INFINITY;
118
+ const zoomY = spanY > 0 ? Math.log2(usableHeight / (TILE_SIZE * spanY)) : Number.POSITIVE_INFINITY;
119
+ const fit = Math.min(zoomX, zoomY);
120
+ if (!Number.isFinite(fit))
121
+ return options.maxZoom ?? 6;
122
+ return clamp(Math.floor(fit), minZoom, maxZoom);
123
+ }
124
+ /** Keep a zoom on the levels Google tiles at, within the app's range. */
125
+ export const snapZoom = (zoom, min = 1, max = 16) => clamp(Math.round(zoom), min, max);
126
+ /** The app's zoom range, in one place. Exported because a gesture has to clamp to
127
+ * the same bounds `snapZoom` will land on, or a pinch runs away past the last
128
+ * level Google renders and springs back when it commits. */
129
+ export const MIN_ZOOM = 1;
130
+ export const MAX_ZOOM = 16;
131
+ /**
132
+ * The center that keeps one pixel over the same ground while the zoom changes.
133
+ *
134
+ * 🔴 This is what separates a map gesture from a magnifier. Zooming about the
135
+ * frame's center — which is what a naive `zoom + 1` does — means the place the
136
+ * reader is pointing at slides away exactly as they close in on it, so they
137
+ * overshoot, correct, overshoot again. Anchoring at the cursor (or at the midpoint
138
+ * between two pinching fingers) is the behavior every map has, and the reason it
139
+ * is arithmetic rather than a feeling is that it is easy to get subtly wrong: the
140
+ * error is zero at the center and grows toward the edges, so it looks fine in
141
+ * exactly the place a developer tests it.
142
+ *
143
+ * `nextZoom` may be FRACTIONAL. A live gesture runs continuously and only the
144
+ * committed value is snapped — see `MapFrame`.
145
+ *
146
+ * `landsAt` defaults to `pixel` — "hold this spot still", which is a wheel. Pass a
147
+ * different pixel and the ground under `pixel` is carried to `landsAt` instead,
148
+ * which is a PINCH: two fingers that spread and slide at once are asking to zoom
149
+ * and pan in one gesture, and doing them as separate steps makes the map lurch.
150
+ */
151
+ export function zoomAnchoredAt(view, pixel, nextZoom, landsAt = pixel) {
152
+ const target = worldFraction(unproject(pixel, view));
153
+ const scale = TILE_SIZE * 2 ** nextZoom;
154
+ return fromWorldFraction({
155
+ x: target.x - (landsAt.x - view.width / 2) / scale,
156
+ y: target.y - (landsAt.y - view.height / 2) / scale,
157
+ });
158
+ }
159
+ /**
160
+ * Group items that would overlap into one token, at this viewport.
161
+ *
162
+ * 🔴 The problem this solves is visible in the owner's own screenshot: at the zoom
163
+ * that fits the family, forty European pins land inside one degree and print as a
164
+ * single unreadable blob of circles — the map is densest exactly where the family
165
+ * is, which is the worst possible failure mode for a family atlas. Every mapping
166
+ * stack ships a clusterer (Supercluster, Leaflet.markercluster) for this; ours is
167
+ * forty lines because our n is a few hundred places, not a few hundred thousand
168
+ * points, so the quadratic pass is far below a frame budget and needs no index.
169
+ *
170
+ * **Greedy by weight, and that ordering is the whole design.** The heaviest place
171
+ * always seeds its cluster, so the token sits on Windsor rather than drifting onto
172
+ * whichever hamlet happened to be first in the array — and the result is
173
+ * deterministic, which is what lets a test pin it and a hover survive the atlas's
174
+ * 1.5 s refetch. Ties break on id for the same reason.
175
+ *
176
+ * `radiusPx` is in VIEWPORT units (the fixed 640×400 logical frame), not CSS
177
+ * pixels, because that is the space the overlay is drawn in.
178
+ */
179
+ export function clusterByScreen(items, view, radiusPx) {
180
+ if (items.length === 0)
181
+ return [];
182
+ const placed = items.map((item) => ({ item, at: project(item.point, view) }));
183
+ // Heaviest first, id as the tie-break: a stable order in, a stable answer out.
184
+ placed.sort((a, b) => b.item.weight - a.item.weight || (a.item.id < b.item.id ? -1 : 1));
185
+ const taken = new Set();
186
+ const clusters = [];
187
+ const radiusSquared = radiusPx * radiusPx;
188
+ for (let seed = 0; seed < placed.length; seed++) {
189
+ if (taken.has(seed))
190
+ continue;
191
+ const head = placed[seed];
192
+ if (!head)
193
+ continue;
194
+ taken.add(seed);
195
+ const members = [head.item];
196
+ if (radiusPx > 0) {
197
+ for (let other = seed + 1; other < placed.length; other++) {
198
+ if (taken.has(other))
199
+ continue;
200
+ const candidate = placed[other];
201
+ if (!candidate)
202
+ continue;
203
+ const dx = candidate.at.x - head.at.x;
204
+ const dy = candidate.at.y - head.at.y;
205
+ if (dx * dx + dy * dy > radiusSquared)
206
+ continue;
207
+ taken.add(other);
208
+ members.push(candidate.item);
209
+ }
210
+ }
211
+ clusters.push({
212
+ id: head.item.id,
213
+ point: members.length === 1 ? head.item.point : weightedCenter(members),
214
+ members,
215
+ weight: members.reduce((total, member) => total + member.weight, 0),
216
+ });
217
+ }
218
+ return clusters;
219
+ }
220
+ /**
221
+ * The weight-weighted center of some places.
222
+ *
223
+ * Averaged in WORLD FRACTION space rather than in degrees: latitude is not linear
224
+ * on a Mercator screen, so a mean of two latitudes is not the point halfway
225
+ * between them on the picture — and the token would sit visibly off its own
226
+ * members the further north the family is, which for this family is all of it.
227
+ */
228
+ function weightedCenter(members) {
229
+ let x = 0;
230
+ let y = 0;
231
+ let total = 0;
232
+ for (const member of members) {
233
+ // Floor of 1 so a place with no recorded people still pulls its own position
234
+ // rather than vanishing from the average.
235
+ const weight = Math.max(1, member.weight);
236
+ const fraction = worldFraction(member.point);
237
+ x += fraction.x * weight;
238
+ y += fraction.y * weight;
239
+ total += weight;
240
+ }
241
+ return fromWorldFraction({ x: x / total, y: y / total });
242
+ }
243
+ /** Mean earth radius, km. */
244
+ const EARTH_RADIUS_KM = 6371.0088;
245
+ /**
246
+ * Great-circle distance in kilometers.
247
+ *
248
+ * Straight-line, not travel time. A road distance between a 2026 address and an
249
+ * 1889 village is a fiction — there may be an ocean and there was certainly no
250
+ * road — so the honest number is "how far apart these two points are", and it
251
+ * costs no API call.
252
+ */
253
+ export function haversineKm(a, b) {
254
+ const toRad = (deg) => (deg * Math.PI) / 180;
255
+ const dLat = toRad(b.lat - a.lat);
256
+ const dLng = toRad(b.lng - a.lng);
257
+ const h = Math.sin(dLat / 2) ** 2 +
258
+ Math.cos(toRad(a.lat)) * Math.cos(toRad(b.lat)) * Math.sin(dLng / 2) ** 2;
259
+ return 2 * EARTH_RADIUS_KM * Math.asin(Math.min(1, Math.sqrt(h)));
260
+ }
261
+ const kmToMiles = (km) => km * 0.621371;
262
+ /** "4,380 miles · 7,050 km" — both, because the family spans two countries that
263
+ * do not agree, and picking one for everybody is worse than showing eight extra
264
+ * characters. Rounded to something a person would say out loud. */
265
+ export function formatDistance(km) {
266
+ if (km < 1)
267
+ return "less than a mile apart";
268
+ const miles = Math.round(kmToMiles(km));
269
+ const rounded = Math.round(km);
270
+ return `${miles.toLocaleString()} mi · ${rounded.toLocaleString()} km`;
271
+ }
272
+ /**
273
+ * The DISTANCE KEY — how far one bar on the map actually is.
274
+ *
275
+ * The owner's ask, on the atlas: *"a distance key on maps so I can tell what a
276
+ * mile looks like."* Every other mark on this map is a family record; the one
277
+ * thing missing was the scale those records are spread over, so a reader could
278
+ * not tell whether two pins were in one parish or two counties.
279
+ *
280
+ * ── 🔴 It costs NOTHING, and that is why it is pure arithmetic here ──────────
281
+ * Google's own Static Maps renders can carry no scale bar, and asking for one
282
+ * would be a different render. The ground resolution of a Web Mercator viewport
283
+ * is a closed form — {@link EQUATOR_METRES} of world at zoom 0 across
284
+ * `TILE_SIZE` pixels, narrowed by `cos(latitude)` — so the bar is derived from
285
+ * the viewport this app already committed to, with no call and no image.
286
+ *
287
+ * ── 🔴 Miles FIRST, kilometers beside it ────────────────────────────────────
288
+ * The same split {@link formatDistance} makes, and for the same reason: the
289
+ * family lives in Texas and the records are English and German. A bar labeled
290
+ * in one unit makes half the readers do arithmetic to read a map.
291
+ *
292
+ * The chosen distance is the largest of the 1/2/5 series that still fits inside
293
+ * `maxUnits` — the convention every map uses, because "1 mi" and "2 mi" are
294
+ * distances a person holds in their head and "1.37 mi" is not.
295
+ */
296
+ export function scaleBar(view, maxUnits = 110) {
297
+ // Ground resolution at the viewport's own latitude. Clamped to Mercator's
298
+ // pole limit so a map framed on the Arctic cannot divide by a cosine of zero
299
+ // and render a bar of infinite length.
300
+ const lat = clamp(view.center.lat, -MERCATOR_MAX_LAT, MERCATOR_MAX_LAT);
301
+ const metresPerUnit = (EQUATOR_METRES * Math.cos((lat * Math.PI) / 180)) / (TILE_SIZE * 2 ** view.zoom);
302
+ const maxMiles = (metresPerUnit * maxUnits) / METRES_PER_MILE;
303
+ // The 1/2/5 series, in miles, from a thousandth of a mile to a quarter of the
304
+ // planet. Walked downward so the first that fits is the largest that fits.
305
+ const nice = niceSteps(maxMiles);
306
+ const miles = nice ?? 0;
307
+ if (miles <= 0)
308
+ return { widthUnits: 0, label: "" };
309
+ const widthUnits = (miles * METRES_PER_MILE) / metresPerUnit;
310
+ const km = miles * 1.609344;
311
+ return {
312
+ widthUnits,
313
+ label: `${formatScaleNumber(miles)} mi · ${formatScaleNumber(km)} km`,
314
+ };
315
+ }
316
+ /** The largest 1/2/5-series value at or below `ceiling`, or null when even the
317
+ * smallest step is too big for the space — which is the honest answer for a
318
+ * frame a few pixels wide, not a bar labeled with a fraction. */
319
+ function niceSteps(ceiling) {
320
+ if (!Number.isFinite(ceiling) || ceiling <= 0)
321
+ return null;
322
+ const magnitude = 10 ** Math.floor(Math.log10(ceiling));
323
+ for (const step of [5, 2, 1]) {
324
+ const candidate = step * magnitude;
325
+ if (candidate <= ceiling)
326
+ return candidate;
327
+ }
328
+ // `magnitude` is by construction ≤ ceiling, so this is unreachable for finite
329
+ // positive input — kept as the honest fallback rather than a non-null assert.
330
+ return magnitude <= ceiling ? magnitude : null;
331
+ }
332
+ /** A scale-bar number as a person would say it: no decimals above 10, at most
333
+ * one below, and never a trailing zero. */
334
+ function formatScaleNumber(value) {
335
+ if (value >= 10)
336
+ return Math.round(value).toLocaleString();
337
+ if (value >= 1)
338
+ return String(Number(value.toFixed(1)));
339
+ return String(Number(value.toFixed(2)));
340
+ }
341
+ /** The circumference of the earth at the equator, in meters — the constant Web
342
+ * Mercator's ground resolution is defined against. */
343
+ const EQUATOR_METRES = 40075016.686;
344
+ const METRES_PER_MILE = 1609.344;
345
+ //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AC;AAED;uDACuD;AACvD,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,eAAe,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type { Bounds, Cluster, Clusterable, LatLng, Viewport } from './geo.js';
2
+ export { boundsOf, centerOf, clusterByScreen, formatDistance, fromWorldFraction, haversineKm, MAX_ZOOM, MERCATOR_MAX_LAT, MIN_ZOOM, project, scaleBar, snapZoom, unproject, worldFraction, zoomAnchoredAt, zoomToFit, } from './geo.js';
3
+ export type { MapFrameProps } from './MapFrame.js';
4
+ export { imagePlacement, MapFrame, mapImageSource, pannedCenter, VIEW_HEIGHT, VIEW_WIDTH, visibleArea, WHEEL_SETTLE_MS, } from './MapFrame.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/map-frame/index.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,GACT,MAAM,UAAU,CAAC;AAClB,YAAY,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACN,cAAc,EACd,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,UAAU,EACV,WAAW,EACX,eAAe,GACf,MAAM,eAAe,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { boundsOf, centerOf, clusterByScreen, formatDistance, fromWorldFraction, haversineKm, MAX_ZOOM, MERCATOR_MAX_LAT, MIN_ZOOM, project, scaleBar, snapZoom, unproject, worldFraction, zoomAnchoredAt, zoomToFit, } from './geo.js';
2
+ export { imagePlacement, MapFrame, mapImageSource, pannedCenter, VIEW_HEIGHT, VIEW_WIDTH, visibleArea, WHEEL_SETTLE_MS, } from './MapFrame.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/map-frame/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,WAAW,EACX,QAAQ,EACR,gBAAgB,EAChB,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,aAAa,EACb,cAAc,EACd,SAAS,GACT,MAAM,UAAU,CAAC;AAElB,OAAO,EACN,cAAc,EACd,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,WAAW,EACX,UAAU,EACV,WAAW,EACX,eAAe,GACf,MAAM,eAAe,CAAC"}