cursedbelt 6.32.0 → 6.34.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.
- package/dist/react/components/DataTable/useTableViewMode.d.ts +8 -8
- package/dist/react/components/DataTable/useTableViewMode.d.ts.map +1 -1
- package/dist/react/components/DataTable/useTableViewMode.js +8 -8
- package/dist/react/components/DataTable/useTableViewMode.js.map +1 -1
- package/dist/react/deep-link/index.d.ts +1 -1
- package/dist/react/deep-link/index.d.ts.map +1 -1
- package/dist/react/deep-link/index.js +1 -1
- package/dist/react/deep-link/index.js.map +1 -1
- package/dist/react/deep-link/links.d.ts +2 -3
- package/dist/react/deep-link/links.d.ts.map +1 -1
- package/dist/react/deep-link/links.js +4 -7
- package/dist/react/deep-link/links.js.map +1 -1
- package/dist/react/deep-link/resume.d.ts +17 -24
- package/dist/react/deep-link/resume.d.ts.map +1 -1
- package/dist/react/deep-link/resume.js +0 -127
- package/dist/react/deep-link/resume.js.map +1 -1
- package/dist/react/deep-link/useDeepLink.d.ts +4 -3
- package/dist/react/deep-link/useDeepLink.d.ts.map +1 -1
- package/dist/react/deep-link/useDeepLink.js +1 -1
- package/dist/react/deep-link/useDeepLink.js.map +1 -1
- package/dist/react/map-frame/MapFrame.d.ts +58 -8
- package/dist/react/map-frame/MapFrame.d.ts.map +1 -1
- package/dist/react/map-frame/MapFrame.js +114 -17
- package/dist/react/map-frame/MapFrame.js.map +1 -1
- package/dist/react/map-frame/geo.d.ts +66 -1
- package/dist/react/map-frame/geo.d.ts.map +1 -1
- package/dist/react/map-frame/geo.js +99 -1
- package/dist/react/map-frame/geo.js.map +1 -1
- package/dist/react/map-frame/index.d.ts +3 -3
- package/dist/react/map-frame/index.d.ts.map +1 -1
- package/dist/react/map-frame/index.js +2 -2
- package/dist/react/map-frame/index.js.map +1 -1
- package/package.json +1 -1
- package/src/react/components/DataTable/useTableViewMode.ts +9 -10
- package/src/react/deep-link/index.ts +0 -4
- package/src/react/deep-link/links.ts +5 -8
- package/src/react/deep-link/resume.spec.tsx +9 -215
- package/src/react/deep-link/resume.ts +13 -154
- package/src/react/deep-link/useDeepLink.tsx +5 -4
- package/src/react/map-frame/MapFrame.box.spec.tsx +45 -0
- package/src/react/map-frame/MapFrame.cover.spec.tsx +67 -0
- package/src/react/map-frame/MapFrame.tsx +131 -20
- package/src/react/map-frame/clusterFold.spec.ts +54 -0
- package/src/react/map-frame/fit.spec.ts +116 -0
- package/src/react/map-frame/geo.ts +132 -0
- package/src/react/map-frame/index.ts +12 -3
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The tight fit and the picture between two levels — moved with the code from
|
|
3
|
+
* photos' Places map test (apps/photos, now gone from it) (forge tasks 5879, 5888 → 5887, 5912), so every map that fits through
|
|
4
|
+
* the frame is held to them. The token fold's tests are clusterFold.spec.ts.
|
|
5
|
+
*/
|
|
6
|
+
import { describe, expect, it } from "bun:test";
|
|
7
|
+
import { FIT_INSET, fitTight, type LatLng, project, snapTight, stepZoom, unproject, VIEW_HEIGHT, VIEW_WIDTH } from "./geo.js";
|
|
8
|
+
import { mapImageSource, visibleArea } from "./MapFrame.js";
|
|
9
|
+
|
|
10
|
+
/** Where each point lands in the frame's 640×400 at a view. */
|
|
11
|
+
const landed = (points: readonly LatLng[], view: { center: LatLng; zoom: number }) => points.map((point) => project(point, { ...view, width: VIEW_WIDTH, height: VIEW_HEIGHT }));
|
|
12
|
+
|
|
13
|
+
/** Every point inside the clear part of the box, and the pins reaching an edge of it on one axis within `slack` units. */
|
|
14
|
+
function expectTight(points: readonly LatLng[], box: { width: number; height: number }, slack: number): void {
|
|
15
|
+
const area = visibleArea(box);
|
|
16
|
+
const at = landed(points, fitTight(points, area));
|
|
17
|
+
const clear = { left: area.x + FIT_INSET.side, right: area.x + area.width - FIT_INSET.side, top: area.y + FIT_INSET.top, bottom: area.y + area.height - FIT_INSET.bottom };
|
|
18
|
+
const xs = at.map((p) => p.x);
|
|
19
|
+
const ys = at.map((p) => p.y);
|
|
20
|
+
expect(Math.min(...xs)).toBeGreaterThanOrEqual(clear.left - 1e-6);
|
|
21
|
+
expect(Math.max(...xs)).toBeLessThanOrEqual(clear.right + 1e-6);
|
|
22
|
+
expect(Math.min(...ys)).toBeGreaterThanOrEqual(clear.top - 1e-6);
|
|
23
|
+
expect(Math.max(...ys)).toBeLessThanOrEqual(clear.bottom + 1e-6);
|
|
24
|
+
const spare = Math.min(Math.min(...xs) - clear.left + (clear.right - Math.max(...xs)), Math.min(...ys) - clear.top + (clear.bottom - Math.max(...ys)));
|
|
25
|
+
expect(spare).toBeLessThan(slack);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
describe("fitTight — the closest view that still holds every pin", () => {
|
|
29
|
+
// The owner's archive, about: the Pacific coast to the Nile, the Caribbean to Iceland.
|
|
30
|
+
const archive = [
|
|
31
|
+
{ lat: 37.77, lng: -122.42 },
|
|
32
|
+
{ lat: 13.19, lng: -59.54 },
|
|
33
|
+
{ lat: 64.15, lng: -21.94 },
|
|
34
|
+
{ lat: 30.01, lng: 31.21 },
|
|
35
|
+
{ lat: 51.51, lng: -0.05 },
|
|
36
|
+
];
|
|
37
|
+
const desk = { width: 1136, height: 710 };
|
|
38
|
+
const phone = { width: 358, height: 448 };
|
|
39
|
+
|
|
40
|
+
it("🔴 the whole archive is in view with no room to spare — on a desk's 16:10 and on a phone's 4:5", () => {
|
|
41
|
+
// A step of the picture's width is 16 of 640, so the spare room is under a twentieth of the clear box.
|
|
42
|
+
expectTight(archive, desk, 32);
|
|
43
|
+
expectTight(archive, phone, 32);
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("🔴 it is closer than the whole level a floored fit stops at — Asia and the south are cut away", () => {
|
|
47
|
+
const view = fitTight(archive, visibleArea(desk));
|
|
48
|
+
expect(view.zoom).toBeGreaterThan(2);
|
|
49
|
+
expect(view.zoom).toBeLessThan(3);
|
|
50
|
+
// The frame's left edge is the Pacific just off California, not the far side of the date line.
|
|
51
|
+
const west = unproject({ x: 0, y: VIEW_HEIGHT / 2 }, { ...view, width: VIEW_WIDTH, height: VIEW_HEIGHT });
|
|
52
|
+
expect(west.lng).toBeGreaterThan(-140);
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it("Iceland stays in: the center is the middle on the map, not the middle of the latitudes", () => {
|
|
56
|
+
const tall = [
|
|
57
|
+
{ lat: 13.19, lng: -59.54 },
|
|
58
|
+
{ lat: 64.15, lng: -21.94 },
|
|
59
|
+
];
|
|
60
|
+
expectTight(tall, desk, 32);
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it("one street fits one section of a city, both on a step of the picture's width", () => {
|
|
64
|
+
const seattle = [
|
|
65
|
+
{ lat: 47.66, lng: -122.4 },
|
|
66
|
+
{ lat: 47.61, lng: -122.1 },
|
|
67
|
+
];
|
|
68
|
+
expectTight(seattle, desk, 32);
|
|
69
|
+
expectTight(seattle, phone, 32);
|
|
70
|
+
expect(fitTight(seattle, visibleArea(phone)).zoom).toBeLessThan(fitTight(seattle, visibleArea(desk)).zoom);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
it("one place is street level, never the frame's closest zoom", () => {
|
|
74
|
+
expect(fitTight([{ lat: 47.66, lng: -122.4 }], visibleArea(desk)).zoom).toBe(12);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it("nothing placed is the whole world", () => {
|
|
78
|
+
expect(fitTight([], visibleArea(phone))).toEqual({ center: { lat: 20, lng: 0 }, zoom: 1 });
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
describe("the picture behind a fit between two levels", () => {
|
|
83
|
+
const center = { lat: 40.123456, lng: -45.5 };
|
|
84
|
+
|
|
85
|
+
it("a whole level asks for the frame's 640×400 picture — a drag or a pinch costs what it always did", () => {
|
|
86
|
+
expect(mapImageSource(center, 3, "dark")).toBe("/api/map?lat=40.1235&lng=-45.5000&z=3&w=640&h=400&theme=dark");
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
it("🔴 between levels it is the level below, smaller by exactly the fraction — the ground the frame covers", () => {
|
|
90
|
+
for (const raw of [2.07, 2.31, 2.5, 2.77, 2.999, 9.4]) {
|
|
91
|
+
const zoom = snapTight(raw);
|
|
92
|
+
expect(zoom).toBeLessThanOrEqual(raw);
|
|
93
|
+
expect(raw - zoom).toBeLessThan(0.075);
|
|
94
|
+
const url = new URL(mapImageSource(center, zoom, "light"), "http://x");
|
|
95
|
+
const width = Number(url.searchParams.get("w"));
|
|
96
|
+
const height = Number(url.searchParams.get("h"));
|
|
97
|
+
expect(url.searchParams.get("z")).toBe(String(Math.floor(raw)));
|
|
98
|
+
expect(width % 16).toBe(0);
|
|
99
|
+
expect(height).toBe((width * 5) / 8);
|
|
100
|
+
expect(width).toBeGreaterThan(320);
|
|
101
|
+
// 640 frame units at the fraction are `width` picture pixels at the level below.
|
|
102
|
+
expect(VIEW_WIDTH / 2 ** (zoom - Math.floor(raw))).toBeCloseTo(width, 6);
|
|
103
|
+
expect(url.searchParams.get("lat")).toBe("40.1235");
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
it("a whole level stays itself, and the keys step onto whole levels from between them", () => {
|
|
108
|
+
expect(snapTight(4)).toBe(4);
|
|
109
|
+
expect(stepZoom(2.42, 1)).toBe(3);
|
|
110
|
+
expect(stepZoom(2.42, -1)).toBe(2);
|
|
111
|
+
expect(stepZoom(3, 1)).toBe(4);
|
|
112
|
+
expect(stepZoom(3, -1)).toBe(2);
|
|
113
|
+
expect(stepZoom(1, -1)).toBe(1);
|
|
114
|
+
expect(stepZoom(16, 1)).toBe(16);
|
|
115
|
+
});
|
|
116
|
+
});
|
|
@@ -205,6 +205,88 @@ export function zoomAnchoredAt(
|
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
// ─────────────────────────── fitting between two levels ─────────────────────────
|
|
209
|
+
|
|
210
|
+
/** The frame's fixed logical viewport, in units every overlay is drawn in. 640×400 because Google
|
|
211
|
+
* caps a single static render at 640px before `scale` — `MapFrame` re-exports these. */
|
|
212
|
+
export const VIEW_WIDTH = 640;
|
|
213
|
+
export const VIEW_HEIGHT = 400;
|
|
214
|
+
|
|
215
|
+
/** A between-levels picture's width moves in steps of this, so its height (5/8 of it) is whole too. */
|
|
216
|
+
export const TIGHT_STEP = 16;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The closest zoom at or under `zoom` whose picture is a whole step wide: level `n` plus
|
|
220
|
+
* `log2(640 / width)`, with the width on a step of {@link TIGHT_STEP} from 336 to 640 — 21 possible
|
|
221
|
+
* pictures a level, not one for every pixel a window is dragged through (`/api/map` bills each
|
|
222
|
+
* distinct view). Down, never up: a fit rounded up would push a pin off the edge.
|
|
223
|
+
*/
|
|
224
|
+
export function snapTight(zoom: number): number {
|
|
225
|
+
const level = Math.floor(zoom);
|
|
226
|
+
const width = Math.min(VIEW_WIDTH, Math.ceil(VIEW_WIDTH / 2 ** (zoom - level) / TIGHT_STEP - 1e-9) * TIGHT_STEP);
|
|
227
|
+
return level + Math.log2(VIEW_WIDTH / width);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/** What a fit keeps clear around its points, in viewport units. */
|
|
231
|
+
export interface FitInset {
|
|
232
|
+
top: number;
|
|
233
|
+
side: number;
|
|
234
|
+
bottom: number;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* The default {@link FitInset}: a token's radius and its ring at every edge, and at the foot the strip
|
|
239
|
+
* the frame's distance key and a HUD's zoom keys are drawn over — a place under a control is a place
|
|
240
|
+
* missing from the view. Both sit above Google's own foot (its logo and "Map data ©", 24 render px the
|
|
241
|
+
* frame's `ATTRIBUTION_FOOT` keeps clear — forge task 5916), so the foot inset carries it too.
|
|
242
|
+
*/
|
|
243
|
+
export const FIT_INSET: FitInset = { top: 24, side: 24, bottom: 84 };
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* The closest viewport that holds every point inside `area` (the part of the frame its box shows —
|
|
247
|
+
* `visibleArea`) less `inset`, at a zoom BETWEEN Google's levels (forge task 5879, lifted in 5887).
|
|
248
|
+
* `zoomToFit` floors to a whole level, which can leave a spread a small island in a map twice as wide
|
|
249
|
+
* as it needs to be; this is {@link snapTight}ed instead, and `mapImageSource` draws it for one render.
|
|
250
|
+
*
|
|
251
|
+
* 🔴 The center is the middle of the points ON THE MAP (Mercator), not of their latitudes: from the
|
|
252
|
+
* Caribbean to Iceland those differ by a fifth of the frame, and a tight fit centered on the
|
|
253
|
+
* latitudes cuts Iceland off. And that middle lands on the middle of the CLEAR part of the area —
|
|
254
|
+
* above the frame's own middle when the foot inset is the larger — so one point sits above center.
|
|
255
|
+
*/
|
|
256
|
+
export function fitTight(
|
|
257
|
+
points: readonly LatLng[],
|
|
258
|
+
area: { x: number; y: number; width: number; height: number },
|
|
259
|
+
options: { inset?: FitInset; maxZoom?: number; minZoom?: number; empty?: { center: LatLng; zoom: number } } = {},
|
|
260
|
+
): { center: LatLng; zoom: number } {
|
|
261
|
+
const inset = options.inset ?? FIT_INSET;
|
|
262
|
+
const bounds = boundsOf([...points]);
|
|
263
|
+
if (!bounds) return options.empty ?? { center: { lat: 20, lng: 0 }, zoom: 1 };
|
|
264
|
+
const sw = worldFraction({ lat: bounds.south, lng: bounds.west });
|
|
265
|
+
const ne = worldFraction({ lat: bounds.north, lng: bounds.east });
|
|
266
|
+
const width = Math.max(32, area.width - inset.side * 2);
|
|
267
|
+
const height = Math.max(32, area.height - inset.top - inset.bottom);
|
|
268
|
+
const spanX = ne.x - sw.x;
|
|
269
|
+
const spanY = sw.y - ne.y;
|
|
270
|
+
const closest = Math.min(
|
|
271
|
+
spanX > 0 ? Math.log2(width / (TILE_SIZE * spanX)) : Number.POSITIVE_INFINITY,
|
|
272
|
+
spanY > 0 ? Math.log2(height / (TILE_SIZE * spanY)) : Number.POSITIVE_INFINITY,
|
|
273
|
+
);
|
|
274
|
+
const zoom = snapTight(clamp(closest, options.minZoom ?? MIN_ZOOM, options.maxZoom ?? 12));
|
|
275
|
+
const scale = TILE_SIZE * 2 ** zoom;
|
|
276
|
+
const clear = { x: area.x + inset.side + width / 2, y: area.y + inset.top + height / 2 };
|
|
277
|
+
return {
|
|
278
|
+
center: fromWorldFraction({
|
|
279
|
+
x: (sw.x + ne.x) / 2 - (clear.x - VIEW_WIDTH / 2) / scale,
|
|
280
|
+
y: (sw.y + ne.y) / 2 - (clear.y - VIEW_HEIGHT / 2) / scale,
|
|
281
|
+
}),
|
|
282
|
+
zoom,
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/** One level in or out from wherever the view is — from a fit between two levels, onto the next whole one. */
|
|
287
|
+
export const stepZoom = (zoom: number, by: 1 | -1): number =>
|
|
288
|
+
clamp(by > 0 ? Math.floor(zoom + 1e-9) + 1 : Math.ceil(zoom - 1e-9) - 1, MIN_ZOOM, MAX_ZOOM);
|
|
289
|
+
|
|
208
290
|
// ─────────────────────────── clustering the map's dots ──────────────────────────
|
|
209
291
|
|
|
210
292
|
/** Anything the clusterer can place: an identity, a position and a magnitude. */
|
|
@@ -251,8 +333,25 @@ export function clusterByScreen<T extends Clusterable>(
|
|
|
251
333
|
items: readonly T[],
|
|
252
334
|
view: Viewport,
|
|
253
335
|
radiusPx: number,
|
|
336
|
+
options: ClusterDrawing = {},
|
|
254
337
|
): Cluster<T>[] {
|
|
255
338
|
if (items.length === 0) return [];
|
|
339
|
+
const clusters = clusterWithin(items, view, radiusPx);
|
|
340
|
+
return options.drawnRadius ? foldTouching(clusters, view, options.drawnRadius, options.gap ?? 2) : clusters;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* How a caller draws its tokens, so {@link clusterByScreen} can promise no two of them touch.
|
|
345
|
+
* `drawnRadius` is a token's disc radius in viewport units for a cluster's TOTAL weight; `gap` is the
|
|
346
|
+
* clear space kept between two discs (a token's outline, half outside each disc — default 2).
|
|
347
|
+
*/
|
|
348
|
+
export interface ClusterDrawing {
|
|
349
|
+
drawnRadius?: (weight: number) => number;
|
|
350
|
+
gap?: number;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
/** The greedy pass: the heaviest unplaced item seeds a cluster of everything within `radiusPx` of it. */
|
|
354
|
+
function clusterWithin<T extends Clusterable>(items: readonly T[], view: Viewport, radiusPx: number): Cluster<T>[] {
|
|
256
355
|
const placed = items.map((item) => ({ item, at: project(item.point, view) }));
|
|
257
356
|
// Heaviest first, id as the tie-break: a stable order in, a stable answer out.
|
|
258
357
|
placed.sort((a, b) => b.item.weight - a.item.weight || (a.item.id < b.item.id ? -1 : 1));
|
|
@@ -289,6 +388,39 @@ export function clusterByScreen<T extends Clusterable>(
|
|
|
289
388
|
return clusters;
|
|
290
389
|
}
|
|
291
390
|
|
|
391
|
+
/**
|
|
392
|
+
* 🔴 One fixed distance cannot be the whole rule (forge tasks 5888, 5912): a drawn token grows with its
|
|
393
|
+
* count, so two heavy clusters just past `radiusPx` drew discs over each other and hid a count — on
|
|
394
|
+
* photos' map and family's atlas alike. Raising the radius ends that too, but merges every light pin
|
|
395
|
+
* that had room. So any cluster whose DRAWN disc would touch a heavier one folds into it; folding
|
|
396
|
+
* repeats until nothing touches, because a fold grows the token and moves it to the weighted middle of
|
|
397
|
+
* what it now holds. The heavier keeps its id, the same rule the greedy pass keeps.
|
|
398
|
+
*/
|
|
399
|
+
function foldTouching<T extends Clusterable>(start: Cluster<T>[], view: Viewport, drawnRadius: (weight: number) => number, gap: number): Cluster<T>[] {
|
|
400
|
+
type Placed = { cluster: Cluster<T>; x: number; y: number; r: number };
|
|
401
|
+
const place = (cluster: Cluster<T>): Placed => ({ cluster, ...project(cluster.point, view), r: drawnRadius(cluster.weight) });
|
|
402
|
+
let tokens = start.map(place);
|
|
403
|
+
for (let folded = true; folded; ) {
|
|
404
|
+
folded = false;
|
|
405
|
+
tokens.sort((a, b) => b.cluster.weight - a.cluster.weight || (a.cluster.id < b.cluster.id ? -1 : 1));
|
|
406
|
+
outer: for (let i = 0; i < tokens.length; i++) {
|
|
407
|
+
for (let j = i + 1; j < tokens.length; j++) {
|
|
408
|
+
const big = tokens[i] as Placed;
|
|
409
|
+
const small = tokens[j] as Placed;
|
|
410
|
+
const reach = big.r + small.r + gap;
|
|
411
|
+
if ((big.x - small.x) ** 2 + (big.y - small.y) ** 2 >= reach * reach) continue;
|
|
412
|
+
const members = [...big.cluster.members, ...small.cluster.members];
|
|
413
|
+
tokens = tokens.filter((t) => t !== big && t !== small);
|
|
414
|
+
tokens.push(place({ id: big.cluster.id, point: weightedCenter(members), members, weight: big.cluster.weight + small.cluster.weight }));
|
|
415
|
+
folded = true;
|
|
416
|
+
break outer;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
tokens.sort((a, b) => b.cluster.weight - a.cluster.weight || (a.cluster.id < b.cluster.id ? -1 : 1));
|
|
421
|
+
return tokens.map((t) => t.cluster);
|
|
422
|
+
}
|
|
423
|
+
|
|
292
424
|
/**
|
|
293
425
|
* The weight-weighted center of some places.
|
|
294
426
|
*
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
// overlay on top that projects with the same Web Mercator math, one billable render per
|
|
3
3
|
// gesture (forge task 3700, lifted from apps/family). Its own subpath, so a page with no map
|
|
4
4
|
// never pulls it in; the pure math is also its own leaf, `cursedbelt/react/map-frame/geo`.
|
|
5
|
-
export type { Bounds, Cluster, Clusterable, LabelMark, LatLng, Viewport } from './geo.js';
|
|
5
|
+
export type { Bounds, Cluster, ClusterDrawing, Clusterable, FitInset, LabelMark, LatLng, Viewport } from './geo.js';
|
|
6
6
|
export {
|
|
7
7
|
boundsOf,
|
|
8
8
|
centerOf,
|
|
9
9
|
clusterByScreen,
|
|
10
|
+
FIT_INSET,
|
|
11
|
+
fitTight,
|
|
10
12
|
formatDistance,
|
|
11
13
|
fromWorldFraction,
|
|
12
14
|
haversineKm,
|
|
@@ -17,8 +19,13 @@ export {
|
|
|
17
19
|
MIN_ZOOM,
|
|
18
20
|
project,
|
|
19
21
|
scaleBar,
|
|
22
|
+
snapTight,
|
|
20
23
|
snapZoom,
|
|
24
|
+
stepZoom,
|
|
25
|
+
TIGHT_STEP,
|
|
21
26
|
unproject,
|
|
27
|
+
VIEW_HEIGHT,
|
|
28
|
+
VIEW_WIDTH,
|
|
22
29
|
worldFraction,
|
|
23
30
|
zoomAnchoredAt,
|
|
24
31
|
zoomToFit,
|
|
@@ -27,10 +34,12 @@ export type { MapFrameProps, MapWheelMode } from './MapFrame.js';
|
|
|
27
34
|
export {
|
|
28
35
|
imagePlacement,
|
|
29
36
|
MapFrame,
|
|
37
|
+
ATTRIBUTION_FOOT,
|
|
38
|
+
attributionFoot,
|
|
39
|
+
type MapCover,
|
|
30
40
|
mapImageSource,
|
|
41
|
+
mapRender,
|
|
31
42
|
pannedCenter,
|
|
32
|
-
VIEW_HEIGHT,
|
|
33
|
-
VIEW_WIDTH,
|
|
34
43
|
visibleArea,
|
|
35
44
|
WHEEL_HINT_MS,
|
|
36
45
|
WHEEL_SETTLE_MS,
|