@mapvx/web-js 3.1.0-dev.2 → 3.1.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 (43) hide show
  1. package/dist/cjs/controllers/routeController.js +0 -13
  2. package/dist/cjs/controllers/routeController.js.map +1 -1
  3. package/dist/cjs/domain/models/mapConfig.js +1 -13
  4. package/dist/cjs/domain/models/mapConfig.js.map +1 -1
  5. package/dist/cjs/domain/models/marker.js +82 -147
  6. package/dist/cjs/domain/models/marker.js.map +1 -1
  7. package/dist/cjs/index.js +1 -2
  8. package/dist/cjs/index.js.map +1 -1
  9. package/dist/cjs/logger/sentry.js +1 -1
  10. package/dist/cjs/map/map.js +3 -41
  11. package/dist/cjs/map/map.js.map +1 -1
  12. package/dist/es/controllers/routeController.d.ts +0 -7
  13. package/dist/es/controllers/routeController.d.ts.map +1 -1
  14. package/dist/es/controllers/routeController.js +0 -13
  15. package/dist/es/controllers/routeController.js.map +1 -1
  16. package/dist/es/domain/models/mapConfig.d.ts +0 -73
  17. package/dist/es/domain/models/mapConfig.d.ts.map +1 -1
  18. package/dist/es/domain/models/mapConfig.js +0 -12
  19. package/dist/es/domain/models/mapConfig.js.map +1 -1
  20. package/dist/es/domain/models/marker.d.ts +1 -232
  21. package/dist/es/domain/models/marker.d.ts.map +1 -1
  22. package/dist/es/domain/models/marker.js +82 -146
  23. package/dist/es/domain/models/marker.js.map +1 -1
  24. package/dist/es/index.d.ts +2 -2
  25. package/dist/es/index.d.ts.map +1 -1
  26. package/dist/es/index.js +1 -1
  27. package/dist/es/index.js.map +1 -1
  28. package/dist/es/logger/sentry.js +1 -1
  29. package/dist/es/map/map.d.ts +1 -15
  30. package/dist/es/map/map.d.ts.map +1 -1
  31. package/dist/es/map/map.js +4 -42
  32. package/dist/es/map/map.js.map +1 -1
  33. package/dist/umd/index.js +130 -828
  34. package/dist/umd/index.js.map +1 -1
  35. package/dist/umd/styles.css +19 -45
  36. package/dist/umd/styles.css.map +1 -1
  37. package/package.json +1 -1
  38. package/dist/cjs/controllers/markerLayoutController.js +0 -337
  39. package/dist/cjs/controllers/markerLayoutController.js.map +0 -1
  40. package/dist/es/controllers/markerLayoutController.d.ts +0 -140
  41. package/dist/es/controllers/markerLayoutController.d.ts.map +0 -1
  42. package/dist/es/controllers/markerLayoutController.js +0 -329
  43. package/dist/es/controllers/markerLayoutController.js.map +0 -1
@@ -1,329 +0,0 @@
1
- import { MarkerUtils, TextPosition } from "../domain/models/marker";
2
- /**
3
- * Fraction of the icon's own box, along each axis, that MapLibre's Marker
4
- * anchor math (`translate(-x%, -y%)`) aligns to the geodetic point. Mirrors
5
- * MapLibre's own `anchorTranslate` table so the collision math agrees with
6
- * what's actually on screen.
7
- */
8
- export const ANCHOR_FRACTIONS = {
9
- center: { fx: 0.5, fy: 0.5 },
10
- top: { fx: 0.5, fy: 0 },
11
- bottom: { fx: 0.5, fy: 1 },
12
- left: { fx: 0, fy: 0.5 },
13
- right: { fx: 1, fy: 0.5 },
14
- "top-left": { fx: 0, fy: 0 },
15
- "top-right": { fx: 1, fy: 0 },
16
- "bottom-left": { fx: 0, fy: 1 },
17
- "bottom-right": { fx: 1, fy: 1 },
18
- };
19
- /** Candidate order tried when a marker's preferred side is unavailable. */
20
- export const FALLBACK_ORDER = [
21
- TextPosition.right,
22
- TextPosition.top,
23
- TextPosition.left,
24
- TextPosition.bottom,
25
- ];
26
- /** Builds the icon's on-screen rect from its projected point, size and anchor. */
27
- export function computeIconRect(screen, iconSize, anchor) {
28
- var _a;
29
- const { fx, fy } = (_a = ANCHOR_FRACTIONS[anchor]) !== null && _a !== void 0 ? _a : ANCHOR_FRACTIONS.center;
30
- return {
31
- left: screen.x - fx * iconSize.width,
32
- top: screen.y - fy * iconSize.height,
33
- width: iconSize.width,
34
- height: iconSize.height,
35
- };
36
- }
37
- /**
38
- * Builds a candidate label rect for one side of an icon. Mirrors the CSS in
39
- * `styles.css` (`.text-container.right/left/top/bottom`) exactly, so a
40
- * position the algorithm picks as collision-free renders collision-free.
41
- */
42
- export function computeCandidateRect(iconRect, labelSize, position, gapPx, verticalGapPx) {
43
- switch (position) {
44
- case TextPosition.left:
45
- return {
46
- left: iconRect.left - gapPx - labelSize.width,
47
- top: iconRect.top + iconRect.height / 2 - labelSize.height / 2,
48
- width: labelSize.width,
49
- height: labelSize.height,
50
- };
51
- case TextPosition.top:
52
- return {
53
- left: iconRect.left + iconRect.width / 2 - labelSize.width / 2,
54
- top: iconRect.top - verticalGapPx - labelSize.height,
55
- width: labelSize.width,
56
- height: labelSize.height,
57
- };
58
- case TextPosition.bottom:
59
- return {
60
- left: iconRect.left + iconRect.width / 2 - labelSize.width / 2,
61
- top: iconRect.top + iconRect.height + verticalGapPx,
62
- width: labelSize.width,
63
- height: labelSize.height,
64
- };
65
- case TextPosition.right:
66
- default:
67
- return {
68
- left: iconRect.left + iconRect.width + gapPx,
69
- top: iconRect.top + iconRect.height / 2 - labelSize.height / 2,
70
- width: labelSize.width,
71
- height: labelSize.height,
72
- };
73
- }
74
- }
75
- /** Expands a rect by `padding` on every side. */
76
- export function expandRect(rect, padding) {
77
- return {
78
- left: rect.left - padding,
79
- top: rect.top - padding,
80
- width: rect.width + 2 * padding,
81
- height: rect.height + 2 * padding,
82
- };
83
- }
84
- /** Standard AABB intersection test. */
85
- export function rectsIntersect(a, b) {
86
- return (a.left < b.left + b.width &&
87
- a.left + a.width > b.left &&
88
- a.top < b.top + b.height &&
89
- a.top + a.height > b.top);
90
- }
91
- /**
92
- * Automatic collision avoidance for marker text labels: keeps a marker's
93
- * icon fixed while moving (or hiding) its label to avoid overlapping
94
- * neighboring markers' icons/labels, similar to Google Maps' label
95
- * placement. See {@link MarkerLayoutConfig}.
96
- *
97
- * Not part of the public SDK surface — owned and driven entirely by
98
- * {@link InternalMapVXMap}, mirroring `RouteController`.
99
- */
100
- export class MarkerLayoutController {
101
- constructor(map, config) {
102
- this.labelSizeCache = new WeakMap();
103
- this.iconSizeCache = new WeakMap();
104
- this.lastAppliedState = new WeakMap();
105
- this.attached = false;
106
- this.mapvxMap = map;
107
- this.config = config;
108
- this.boundOnMove = () => this.scheduleRelayout();
109
- }
110
- get map() {
111
- return this.mapvxMap.map;
112
- }
113
- /**
114
- * Starts listening for camera movement. Safe to call once the underlying
115
- * MapLibre `Map` instance exists; a single `"move"` listener covers pan,
116
- * zoom, rotate, pitch and `resize()`.
117
- */
118
- attach() {
119
- if (this.attached)
120
- return;
121
- this.attached = true;
122
- this.map.on("move", this.boundOnMove);
123
- this.remeasureWhenFontsLoad();
124
- this.scheduleRelayout();
125
- }
126
- /**
127
- * Publishes the configured gaps and label width cap as CSS custom
128
- * properties, which `styles.css` reads to offset labels from their icon.
129
- * Without this the stylesheet would keep its hardcoded defaults while the
130
- * collision math used the configured values, so any custom `gapPx` /
131
- * `verticalGapPx` would produce placements this controller believes are
132
- * collision-free but that visibly overlap on screen.
133
- *
134
- * Called with the map's own container, so every marker MapLibre mounts
135
- * inside it inherits the values.
136
- */
137
- applyLayoutVariables(container) {
138
- container.style.setProperty("--mapvx-label-gap", `${this.config.gapPx}px`);
139
- container.style.setProperty("--mapvx-label-vertical-gap", `${this.config.verticalGapPx}px`);
140
- container.style.setProperty("--mapvx-label-max-width", `${this.config.maxLabelWidthPx}px`);
141
- }
142
- /**
143
- * A label measured before its web font finishes loading is measured in the
144
- * fallback font, and that wrong footprint would otherwise be cached for
145
- * the marker's lifetime. Drop every measurement once fonts settle.
146
- */
147
- remeasureWhenFontsLoad() {
148
- const fonts = document.fonts;
149
- if (!fonts)
150
- return;
151
- fonts.ready
152
- .then(() => {
153
- if (!this.attached)
154
- return;
155
- this.labelSizeCache = new WeakMap();
156
- this.iconSizeCache = new WeakMap();
157
- this.scheduleRelayout();
158
- })
159
- .catch(() => {
160
- // Font loading failing is not a layout error: the measurements
161
- // already taken in the fallback font stay in effect.
162
- });
163
- }
164
- /** Stops listening and cancels any pending layout pass. */
165
- destroy() {
166
- if (this.attached) {
167
- this.map.off("move", this.boundOnMove);
168
- this.attached = false;
169
- }
170
- if (this.rafHandle !== undefined) {
171
- cancelAnimationFrame(this.rafHandle);
172
- this.rafHandle = undefined;
173
- }
174
- }
175
- /**
176
- * Drops everything cached for a marker, e.g. after its text/content
177
- * changed.
178
- *
179
- * The last applied decision has to go too: rebuilding a marker's DOM
180
- * replaces its `.text-container` with a fresh one carrying the preferred
181
- * side and no `visibility`, so a decision remembered from the old element
182
- * would make {@link applyDecisions} short-circuit and leave the new label
183
- * on the wrong side — or visible when it should be hidden.
184
- */
185
- invalidateMarker(marker) {
186
- this.labelSizeCache.delete(marker);
187
- this.iconSizeCache.delete(marker);
188
- this.lastAppliedState.delete(marker);
189
- }
190
- /** Coalesces repeated calls into a single layout pass per animation frame. */
191
- scheduleRelayout() {
192
- if (!this.config.enabled || this.rafHandle !== undefined)
193
- return;
194
- this.rafHandle = requestAnimationFrame(() => {
195
- this.rafHandle = undefined;
196
- this.performLayout();
197
- });
198
- }
199
- performLayout() {
200
- // Guards against a relayout firing before the underlying MapLibre `map`
201
- // exists (e.g. a marker added before the "load" event) — `attach()`
202
- // schedules its own initial pass once it's safe to touch `this.map`.
203
- if (!this.attached)
204
- return;
205
- const markers = this.mapvxMap.getMarkers();
206
- if (markers.length === 0)
207
- return;
208
- const container = this.map.getContainer();
209
- const viewportWidth = container.clientWidth;
210
- const viewportHeight = container.clientHeight;
211
- const cullMargin = this.config.maxLabelWidthPx + Math.max(this.config.gapPx, this.config.verticalGapPx);
212
- const entries = this.readMarkers(markers, viewportWidth, viewportHeight, cullMargin);
213
- const decisions = this.decidePlacements(entries);
214
- this.applyDecisions(decisions);
215
- }
216
- /** Read phase: project + measure, no writes. Culls markers fully outside the viewport. */
217
- readMarkers(markers, viewportWidth, viewportHeight, cullMargin) {
218
- const entries = [];
219
- for (const marker of markers) {
220
- if (!marker.getElement().isConnected)
221
- continue;
222
- const screen = this.map.project(marker.getLngLat());
223
- const iconRect = computeIconRect(screen, this.resolveIconSize(marker), marker.anchorType);
224
- const outOfViewport = iconRect.left + iconRect.width < -cullMargin ||
225
- iconRect.left > viewportWidth + cullMargin ||
226
- iconRect.top + iconRect.height < -cullMargin ||
227
- iconRect.top > viewportHeight + cullMargin;
228
- if (outOfViewport)
229
- continue;
230
- entries.push({ marker, iconRect, labelSize: this.resolveLabelSize(marker) });
231
- }
232
- return entries;
233
- }
234
- resolveLabelSize(marker) {
235
- const textEl = marker.textContainerEl;
236
- if (!textEl)
237
- return undefined;
238
- return this.measureCached(this.labelSizeCache, marker, textEl);
239
- }
240
- /**
241
- * The icon's box. Markers built from a caller-supplied `element` with no
242
- * declared `iconProperties` are measured from the DOM, since their real
243
- * size is whatever that element renders at; everyone else's box is exactly
244
- * what `MarkerUtils.createMarkerElement` pinned it to.
245
- */
246
- resolveIconSize(marker) {
247
- var _a;
248
- if (!marker.measureIconFromDom)
249
- return marker.iconSize;
250
- return (_a = this.measureCached(this.iconSizeCache, marker, marker.getElement())) !== null && _a !== void 0 ? _a : marker.iconSize;
251
- }
252
- /**
253
- * Measures an element once and remembers it. A zero measurement is
254
- * returned but never cached: it means the element isn't laid out yet (a
255
- * `display: none` ancestor, a first pass before the web font loads), and
256
- * caching it would freeze that marker's footprint at nothing for the rest
257
- * of its life.
258
- */
259
- measureCached(cache, marker, element) {
260
- const cached = cache.get(marker);
261
- if (cached)
262
- return cached;
263
- const measured = { width: element.offsetWidth, height: element.offsetHeight };
264
- if (measured.width <= 0 || measured.height <= 0)
265
- return undefined;
266
- cache.set(marker, measured);
267
- return measured;
268
- }
269
- /** Compute phase: pure, no DOM access. Icons always block; labels negotiate a side or hide. */
270
- decidePlacements(entries) {
271
- const placedLabels = [];
272
- const withLabel = entries.filter(hasLabelSize);
273
- // Stable sort (spec-guaranteed): equal priority keeps insertion order.
274
- withLabel.sort((a, b) => b.marker.labelPriority - a.marker.labelPriority);
275
- const decisions = new Map();
276
- for (const entry of withLabel) {
277
- const order = [
278
- entry.marker.preferredTextPosition,
279
- ...FALLBACK_ORDER.filter((position) => position !== entry.marker.preferredTextPosition),
280
- ];
281
- const fit = order
282
- .map((position) => ({
283
- position,
284
- rect: computeCandidateRect(entry.iconRect, entry.labelSize, position, this.config.gapPx, this.config.verticalGapPx),
285
- }))
286
- .find(({ rect }) => !this.collides(rect, entry.marker, entries, placedLabels));
287
- if (fit) {
288
- placedLabels.push(fit.rect);
289
- decisions.set(entry.marker, { position: fit.position, hidden: false });
290
- }
291
- else {
292
- decisions.set(entry.marker, { position: entry.marker.preferredTextPosition, hidden: true });
293
- }
294
- }
295
- return decisions;
296
- }
297
- /**
298
- * Whether a candidate label rect clashes with any other marker's icon or
299
- * with a label already placed this pass.
300
- *
301
- * A label's own icon is deliberately excluded: `gapPx`/`verticalGapPx`
302
- * already define the spacing to it, and `paddingPx` is breathing room
303
- * against *neighbors*. Counting the own icon here would make top/bottom
304
- * impossible for every marker as soon as `paddingPx` exceeded
305
- * `verticalGapPx` (4 vs 4 by default) — and at `paddingPx: 10` would hide
306
- * every label on the map.
307
- */
308
- collides(rect, self, entries, placedLabels) {
309
- const padded = expandRect(rect, this.config.paddingPx);
310
- return (entries.some((other) => other.marker !== self && rectsIntersect(padded, other.iconRect)) ||
311
- placedLabels.some((label) => rectsIntersect(padded, label)));
312
- }
313
- /** Write phase: only touches the DOM for markers whose decision actually changed. */
314
- applyDecisions(decisions) {
315
- decisions.forEach((decision, marker) => {
316
- const last = this.lastAppliedState.get(marker);
317
- if (last && last.position === decision.position && last.hidden === decision.hidden)
318
- return;
319
- if (marker.textContainerEl) {
320
- MarkerUtils.applyTextPosition(marker.textContainerEl, decision.position, decision.hidden);
321
- }
322
- this.lastAppliedState.set(marker, decision);
323
- });
324
- }
325
- }
326
- function hasLabelSize(entry) {
327
- return entry.labelSize !== undefined;
328
- }
329
- //# sourceMappingURL=markerLayoutController.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markerLayoutController.js","sourceRoot":"","sources":["../../../src/controllers/markerLayoutController.ts"],"names":[],"mappings":"AAEA,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