@sjvair/monitor-map 3.6.0 → 3.6.2

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.
@@ -42,7 +42,15 @@ export const initializeMap = (container) => {
42
42
  preset: "milkyway"
43
43
  }
44
44
  });
45
- map.once("load", () => {
45
+ // "load" fires once the style and initial viewport tiles have loaded --
46
+ // in practice this can hang indefinitely (observed: never fires, even
47
+ // after 20+s, despite the style/tiles being independently fetchable) for
48
+ // reasons that don't affect "idle", which fires once the map has
49
+ // finished rendering after becoming idle. MapShell's own effect no
50
+ // longer waits for a *second* idle event to hide the load screen (see
51
+ // its comment), so listening for "idle" here doesn't reintroduce the
52
+ // hang that change was fixing.
53
+ map.once("idle", () => {
46
54
  mapManager.map = map;
47
55
  });
48
56
  return () => map.remove();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sjvair/monitor-map",
3
3
  "description": "SJVAir's interactive monitor map",
4
- "version": "3.6.0",
4
+ "version": "3.6.2",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SJVAir/monitor-map"
@@ -71,7 +71,7 @@
71
71
  "@lucide/svelte": "^1.46.0",
72
72
  "@maptiler/sdk": "^4.1.0",
73
73
  "@maptiler/weather": "^4.0.1",
74
- "@sjvair/sdk": "npm:@jsr/sjvair__sdk@^4.1.0",
74
+ "@sjvair/sdk": "npm:@jsr/sjvair__sdk@^4.4.0",
75
75
  "@tstk/builtin-extensions": "npm:@jsr/tstk__builtin-extensions@^1.0.8",
76
76
  "@tstk/utils": "npm:@jsr/tstk__utils@^1.1.2",
77
77
  "@turf/area": "^7.4.0",
@@ -61,7 +61,15 @@ export const initializeMap: Attachment<HTMLDivElement> = (container: string | HT
61
61
  }
62
62
  });
63
63
 
64
- map.once("load", () => {
64
+ // "load" fires once the style and initial viewport tiles have loaded --
65
+ // in practice this can hang indefinitely (observed: never fires, even
66
+ // after 20+s, despite the style/tiles being independently fetchable) for
67
+ // reasons that don't affect "idle", which fires once the map has
68
+ // finished rendering after becoming idle. MapShell's own effect no
69
+ // longer waits for a *second* idle event to hide the load screen (see
70
+ // its comment), so listening for "idle" here doesn't reintroduce the
71
+ // hang that change was fixing.
72
+ map.once("idle", () => {
65
73
  mapManager.map = map;
66
74
  });
67
75