@sjvair/monitor-map 3.1.0 → 3.2.1

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.
@@ -95,6 +95,7 @@ function getSeriesConfigs(monitorType) {
95
95
  case "aqview":
96
96
  case "bam1022":
97
97
  case "vozbox":
98
+ case "aqlite":
98
99
  return [baseXSeriesConfig, singleSeriesConfig];
99
100
  case "airgradient":
100
101
  case "purpleair":
@@ -18,6 +18,8 @@ export function getOrder(monitor) {
18
18
  return monitor.is_sjvair ? 4 : 1;
19
19
  case "vozbox":
20
20
  return 7;
21
+ case "aqlite":
22
+ return 8;
21
23
  default:
22
24
  throw new Error(`Map ordering for ${monitor.device} has not been set`);
23
25
  }
@@ -29,6 +31,7 @@ export function getTypeShape(type) {
29
31
  case "airnow":
30
32
  case "aqview":
31
33
  case "bam1022":
34
+ case "aqlite":
32
35
  return "triangle";
33
36
  case "purpleair":
34
37
  return "square";
@@ -19,6 +19,8 @@ export function getIconId(monitor, level) {
19
19
  return `${id}-${monitor.is_sjvair ? "circle" : "square"}`;
20
20
  case "vozbox":
21
21
  return `${id}-circle`;
22
+ case "aqlite":
23
+ return `${id}-triangle`;
22
24
  default:
23
25
  throw new Error(`Map icon for ${monitor.device} has not been set`);
24
26
  }
@@ -19,6 +19,7 @@ declare class MonitorsMapIntegration extends MapIconLayerIntegration<MonitorMark
19
19
  bam1022: MapDisplayOption;
20
20
  airnow: MapDisplayOption;
21
21
  vozbox: MapDisplayOption;
22
+ aqlite: MapDisplayOption;
22
23
  inactive: MapDisplayOption;
23
24
  inside: MapDisplayOption;
24
25
  };
@@ -33,6 +33,7 @@ class MonitorsMapIntegration extends MapIconLayerIntegration {
33
33
  bam1022: new MapDisplayOption("SJVAir FEM", true, this.icons.get("outside-display-triangle")),
34
34
  airnow: new MapDisplayOption("AirNow", true, this.icons.get("outside-display-triangle")),
35
35
  vozbox: new MapDisplayOption("VOZbox", true, this.icons.get("outside-display-circle")),
36
+ aqlite: new MapDisplayOption("AQLite", true, this.icons.get("outside-display-triangle")),
36
37
  inactive: new MapDisplayOption("Inactive", false, this.icons.get("outside-default-square")),
37
38
  inside: new MapDisplayOption("Inside", false, this.icons.get("inside-display-square"))
38
39
  }));
@@ -103,6 +104,8 @@ class MonitorsMapIntegration extends MapIconLayerIntegration {
103
104
  monitorFilters.push(filters.monitor("airnow"));
104
105
  if (this.displayOptions.vozbox.value)
105
106
  monitorFilters.push(filters.monitor("vozbox"));
107
+ if (this.displayOptions.aqlite.value)
108
+ monitorFilters.push(filters.monitor("aqlite"));
106
109
  if (this.displayOptions.sjvair.value)
107
110
  monitorFilters.push(filters.sjvPurpleair(), filters.monitor("airgradient"));
108
111
  if (this.displayOptions.inside.value)
@@ -129,7 +132,8 @@ class MonitorsMapIntegration extends MapIconLayerIntegration {
129
132
  aqview: opts.aqview.value,
130
133
  bam1022: opts.bam1022.value,
131
134
  airnow: opts.airnow.value,
132
- vozbox: opts.vozbox.value
135
+ vozbox: opts.vozbox.value,
136
+ aqlite: opts.aqlite.value
133
137
  };
134
138
  if (!(typeVisible[p.type] ?? true))
135
139
  continue;
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { onDestroy } from "svelte";
3
3
  import { Marker } from "@maptiler/sdk";
4
- import { SearchIcon } from "@lucide/svelte";
4
+ import { MapPinIcon, SearchIcon } from "@lucide/svelte";
5
5
  import { useMonitorMapRouter } from "../router-context";
6
6
  import { mapManager } from "../map/map.svelte";
7
7
  import { debounce } from "../utils";
@@ -169,9 +169,9 @@
169
169
  {@const comma = result.feature.place_name.indexOf(",")}
170
170
  <button
171
171
  onclick={() => selectGeocode(result)}
172
- class="flex h-12 w-full items-center bg-white px-4 text-left hover:brightness-95"
172
+ class="flex h-12 w-full items-center gap-3 bg-white px-4 text-left hover:brightness-95"
173
173
  >
174
- <span class="svg-icon location-on bg-brand mr-3 h-6 w-6 shrink-0"></span>
174
+ <MapPinIcon class="text-brand h-6 w-6 shrink-0" />
175
175
  <div class="min-w-0">
176
176
  <p class="truncate text-sm font-medium">
177
177
  {result.feature.place_name.substring(0, comma < 0 ? undefined : comma)}
package/package.json CHANGED
@@ -1,7 +1,11 @@
1
1
  {
2
2
  "name": "@sjvair/monitor-map",
3
3
  "description": "SJVAir's interactive monitor map",
4
- "version": "3.1.0",
4
+ "version": "3.2.1",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/SJVAir/monitor-map"
8
+ },
5
9
  "scripts": {
6
10
  "dev": "vite dev",
7
11
  "build:local": "PROD_MODE=local vite build",
@@ -67,7 +71,7 @@
67
71
  "@lucide/svelte": "^1.28.0",
68
72
  "@maptiler/sdk": "^4.1.0",
69
73
  "@maptiler/weather": "^3.1.1",
70
- "@sjvair/sdk": "npm:@jsr/sjvair__sdk@^3.1.0",
74
+ "@sjvair/sdk": "npm:@jsr/sjvair__sdk@^3.2.0",
71
75
  "@tstk/builtin-extensions": "npm:@jsr/tstk__builtin-extensions@^1.0.8",
72
76
  "@tstk/utils": "npm:@jsr/tstk__utils@^1.1.2",
73
77
  "@turf/area": "^7.4.0",
@@ -115,6 +115,7 @@ function getSeriesConfigs(monitorType: MonitorType) {
115
115
  case "aqview":
116
116
  case "bam1022":
117
117
  case "vozbox":
118
+ case "aqlite":
118
119
  return [baseXSeriesConfig, singleSeriesConfig];
119
120
 
120
121
  case "airgradient":
@@ -30,6 +30,9 @@ export function getOrder(monitor: MonitorData): number {
30
30
  case "vozbox":
31
31
  return 7;
32
32
 
33
+ case "aqlite":
34
+ return 8;
35
+
33
36
  default:
34
37
  throw new Error(`Map ordering for ${monitor.device} has not been set`);
35
38
  }
@@ -43,6 +46,7 @@ export function getTypeShape(type: string): string {
43
46
  case "airnow":
44
47
  case "aqview":
45
48
  case "bam1022":
49
+ case "aqlite":
46
50
  return "triangle";
47
51
 
48
52
  case "purpleair":
@@ -27,6 +27,9 @@ export function getIconId<T extends MonitorData>(monitor: T, level: SJVAirEntryL
27
27
  case "vozbox":
28
28
  return `${id}-circle`;
29
29
 
30
+ case "aqlite":
31
+ return `${id}-triangle`;
32
+
30
33
  default:
31
34
  throw new Error(`Map icon for ${monitor.device} has not been set`);
32
35
  }
@@ -45,6 +45,7 @@ class MonitorsMapIntegration extends MapIconLayerIntegration<MonitorMarkerProper
45
45
  bam1022: new MapDisplayOption("SJVAir FEM", true, this.icons.get("outside-display-triangle")),
46
46
  airnow: new MapDisplayOption("AirNow", true, this.icons.get("outside-display-triangle")),
47
47
  vozbox: new MapDisplayOption("VOZbox", true, this.icons.get("outside-display-circle")),
48
+ aqlite: new MapDisplayOption("AQLite", true, this.icons.get("outside-display-triangle")),
48
49
  inactive: new MapDisplayOption("Inactive", false, this.icons.get("outside-default-square")),
49
50
  inside: new MapDisplayOption("Inside", false, this.icons.get("inside-display-square"))
50
51
  }));
@@ -119,6 +120,7 @@ class MonitorsMapIntegration extends MapIconLayerIntegration<MonitorMarkerProper
119
120
  if (this.displayOptions.bam1022.value) monitorFilters.push(filters.monitor("bam1022"));
120
121
  if (this.displayOptions.airnow.value) monitorFilters.push(filters.monitor("airnow"));
121
122
  if (this.displayOptions.vozbox.value) monitorFilters.push(filters.monitor("vozbox"));
123
+ if (this.displayOptions.aqlite.value) monitorFilters.push(filters.monitor("aqlite"));
122
124
  if (this.displayOptions.sjvair.value)
123
125
  monitorFilters.push(filters.sjvPurpleair(), filters.monitor("airgradient"));
124
126
  if (this.displayOptions.inside.value)
@@ -147,7 +149,8 @@ class MonitorsMapIntegration extends MapIconLayerIntegration<MonitorMarkerProper
147
149
  aqview: opts.aqview.value,
148
150
  bam1022: opts.bam1022.value,
149
151
  airnow: opts.airnow.value,
150
- vozbox: opts.vozbox.value
152
+ vozbox: opts.vozbox.value,
153
+ aqlite: opts.aqlite.value
151
154
  };
152
155
  if (!(typeVisible[p.type] ?? true)) continue;
153
156
 
@@ -1,7 +1,7 @@
1
1
  <script lang="ts">
2
2
  import { onDestroy } from "svelte";
3
3
  import { Marker } from "@maptiler/sdk";
4
- import { SearchIcon } from "@lucide/svelte";
4
+ import { MapPinIcon, SearchIcon } from "@lucide/svelte";
5
5
  import { useMonitorMapRouter } from "../router-context";
6
6
  import { mapManager } from "$lib/map/map.svelte";
7
7
  import { debounce } from "$lib/utils";
@@ -169,9 +169,9 @@
169
169
  {@const comma = result.feature.place_name.indexOf(",")}
170
170
  <button
171
171
  onclick={() => selectGeocode(result)}
172
- class="flex h-12 w-full items-center bg-white px-4 text-left hover:brightness-95"
172
+ class="flex h-12 w-full items-center gap-3 bg-white px-4 text-left hover:brightness-95"
173
173
  >
174
- <span class="svg-icon location-on bg-brand mr-3 h-6 w-6 shrink-0"></span>
174
+ <MapPinIcon class="text-brand h-6 w-6 shrink-0" />
175
175
  <div class="min-w-0">
176
176
  <p class="truncate text-sm font-medium">
177
177
  {result.feature.place_name.substring(0, comma < 0 ? undefined : comma)}