@sjvair/monitor-map 3.0.3 → 3.0.5
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/lib/LoadScreen.svelte +68 -0
- package/dist/lib/LoadScreen.svelte.d.ts +25 -0
- package/dist/lib/MainMapView.svelte +1 -0
- package/dist/lib/MainMapView.svelte.d.ts +26 -0
- package/dist/lib/MapLegend.svelte +15 -0
- package/dist/lib/MapLegend.svelte.d.ts +18 -0
- package/dist/lib/MonitorDetailPanel.svelte +152 -0
- package/dist/lib/MonitorDetailPanel.svelte.d.ts +3 -0
- package/dist/lib/MonitorMapLayout.svelte +193 -0
- package/dist/lib/MonitorMapLayout.svelte.d.ts +7 -0
- package/dist/lib/actions.d.ts +3 -0
- package/dist/lib/actions.js +12 -8
- package/dist/lib/assets/icons/adjustment-horizontal.svg +3 -0
- package/dist/lib/assets/logos/airgradient-blue.svg +63 -0
- package/dist/lib/assets/logos/airnow-compact.jpg +0 -0
- package/dist/lib/assets/logos/carb-compact.jpg +0 -0
- package/dist/lib/assets/logos/purpleair-compact.png +0 -0
- package/dist/lib/assets/logos/sjvair-parts/sjvair-air.webp +0 -0
- package/dist/lib/assets/logos/sjvair-parts/sjvair-icon.webp +0 -0
- package/dist/lib/assets/logos/sjvair-parts/sjvair-sjv.webp +0 -0
- package/dist/lib/assets/logos/sjvair-white.svg +115 -0
- package/dist/lib/assets/logos/sjvair.svg +96 -0
- package/dist/lib/collocation-sites/CollocationTooltip.svelte +98 -0
- package/dist/lib/collocation-sites/CollocationTooltip.svelte.d.ts +7 -0
- package/dist/lib/collocation-sites/collocation-utils.d.ts +3 -0
- package/dist/lib/collocation-sites/collocation-utils.js +30 -0
- package/dist/lib/collocation-sites/collocations-icon-manager.svelte.d.ts +7 -0
- package/dist/lib/collocation-sites/collocations-icon-manager.svelte.js +17 -20
- package/dist/lib/collocation-sites/collocations-map-integration.svelte.d.ts +18 -0
- package/dist/lib/collocation-sites/collocations-map-integration.svelte.js +98 -83
- package/dist/lib/collocation-sites/collocations.svelte.d.ts +9 -0
- package/dist/lib/collocation-sites/collocations.svelte.js +17 -26
- package/dist/lib/collocation-sites/types.d.ts +8 -0
- package/dist/lib/collocation-sites/types.js +1 -0
- package/dist/lib/colors.d.ts +17 -0
- package/dist/lib/colors.js +29 -23
- package/dist/lib/components/DataBox.svelte +29 -0
- package/dist/lib/components/DataBox.svelte.d.ts +9 -0
- package/dist/lib/components/DisplayOption.svelte +7 -0
- package/dist/lib/components/DisplayOption.svelte.d.ts +5 -0
- package/dist/lib/components/MapLayersDisplayOptions.svelte +42 -0
- package/dist/lib/components/MapLayersDisplayOptions.svelte.d.ts +18 -0
- package/dist/lib/components/SegmentedControl.svelte +61 -0
- package/dist/lib/components/SegmentedControl.svelte.d.ts +11 -0
- package/dist/lib/components/ToggleSwitch.svelte +93 -0
- package/dist/lib/components/ToggleSwitch.svelte.d.ts +9 -0
- package/dist/lib/components/ui/button/button.svelte +89 -0
- package/dist/lib/components/ui/button/button.svelte.d.ts +70 -0
- package/dist/lib/components/ui/button/index.d.ts +2 -0
- package/dist/lib/components/ui/button/index.js +4 -0
- package/dist/lib/components/ui/range-calendar/index.d.ts +19 -0
- package/dist/lib/components/ui/range-calendar/index.js +21 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-caption.svelte +76 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-caption.svelte.d.ts +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-cell.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-cell.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-day.svelte +36 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-day.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.svelte +7 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.svelte +7 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.svelte +12 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid.svelte +16 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-grid.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-header.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-header.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-heading.svelte +16 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-heading.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month-select.svelte +44 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month-select.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month.svelte +15 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-month.svelte.d.ts +5 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-months.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-months.svelte.d.ts +5 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-nav.svelte +19 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-nav.svelte.d.ts +5 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-next-button.svelte +36 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-next-button.svelte.d.ts +8 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.svelte +36 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.svelte.d.ts +8 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-year-select.svelte +43 -0
- package/dist/lib/components/ui/range-calendar/range-calendar-year-select.svelte.d.ts +4 -0
- package/dist/lib/components/ui/range-calendar/range-calendar.svelte +112 -0
- package/dist/lib/components/ui/range-calendar/range-calendar.svelte.d.ts +21 -0
- package/dist/lib/data-chart/DataChart.svelte +303 -0
- package/dist/lib/data-chart/DataChart.svelte.d.ts +7 -0
- package/dist/lib/data-chart/DateRange.d.ts +6 -0
- package/dist/lib/data-chart/DateRange.js +15 -14
- package/dist/lib/data-chart/chart-utils.d.ts +3 -0
- package/dist/lib/data-chart/chart-utils.js +157 -93
- package/dist/lib/data-chart/data-chart.svelte.d.ts +7 -0
- package/dist/lib/data-chart/data-chart.svelte.js +7 -28
- package/dist/lib/data-chart/requests.d.ts +3 -0
- package/dist/lib/data-chart/requests.js +36 -28
- package/dist/lib/data-chart/tooltip.d.ts +10 -0
- package/dist/lib/data-chart/tooltip.js +160 -98
- package/dist/lib/ev-stations/components/EvStationClusterTooltip.svelte +16 -0
- package/dist/lib/ev-stations/components/EvStationClusterTooltip.svelte.d.ts +7 -0
- package/dist/lib/ev-stations/components/EvStationTooltip.svelte +127 -0
- package/dist/lib/ev-stations/components/EvStationTooltip.svelte.d.ts +7 -0
- package/dist/lib/ev-stations/components/EvStationsDisplayOptions.svelte +46 -0
- package/dist/lib/ev-stations/components/EvStationsDisplayOptions.svelte.d.ts +18 -0
- package/dist/lib/ev-stations/data-maps.d.ts +5 -0
- package/dist/lib/ev-stations/data-maps.js +152 -4
- package/dist/lib/ev-stations/ev-station-icons.d.ts +16 -0
- package/dist/lib/ev-stations/ev-station-icons.js +21 -27
- package/dist/lib/ev-stations/ev-stations-cluster-renderer.d.ts +19 -0
- package/dist/lib/ev-stations/ev-stations-cluster-renderer.js +130 -117
- package/dist/lib/ev-stations/ev-stations-map-integration.svelte.d.ts +31 -0
- package/dist/lib/ev-stations/ev-stations-map-integration.svelte.js +206 -180
- package/dist/lib/ev-stations/ev-stations.svelte.d.ts +9 -0
- package/dist/lib/ev-stations/ev-stations.svelte.js +54 -32
- package/dist/lib/ev-stations/types.d.ts +53 -0
- package/dist/lib/ev-stations/types.js +1 -0
- package/dist/lib/ev-stations/zip-codes.d.ts +13 -0
- package/dist/lib/ev-stations/zip-codes.js +457 -135
- package/dist/lib/hms/components/HMSFireLegend.svelte +21 -0
- package/dist/lib/hms/components/HMSFireLegend.svelte.d.ts +18 -0
- package/dist/lib/hms/hms-fire-icon-manager.d.ts +5 -0
- package/dist/lib/hms/hms-fire-icon-manager.js +28 -37
- package/dist/lib/hms/hms-fire-map-integration.svelte.d.ts +23 -0
- package/dist/lib/hms/hms-fire-map-integration.svelte.js +94 -97
- package/dist/lib/hms/hms-smoke-map-integration.svelte.d.ts +19 -0
- package/dist/lib/hms/hms-smoke-map-integration.svelte.js +68 -84
- package/dist/lib/hms/hms.svelte.d.ts +19 -0
- package/dist/lib/hms/hms.svelte.js +225 -76
- package/dist/lib/index.d.ts +68 -0
- package/dist/lib/index.js +56 -21
- package/dist/lib/map/Map.svelte +13 -0
- package/dist/lib/map/Map.svelte.d.ts +8 -0
- package/dist/lib/map/MapStyleDisplayOptions.svelte +61 -0
- package/dist/lib/map/MapStyleDisplayOptions.svelte.d.ts +3 -0
- package/dist/lib/map/Menu.svelte +64 -0
- package/dist/lib/map/Menu.svelte.d.ts +5 -0
- package/dist/lib/map/icons.d.ts +7 -0
- package/dist/lib/map/icons.js +24 -22
- package/dist/lib/map/integrations/base-layer-seperator.d.ts +9 -0
- package/dist/lib/map/integrations/base-layer-seperator.js +11 -12
- package/dist/lib/map/integrations/click-manager.d.ts +14 -0
- package/dist/lib/map/integrations/click-manager.js +52 -33
- package/dist/lib/map/integrations/integrations-manager.d.ts +8 -0
- package/dist/lib/map/integrations/integrations-manager.js +20 -12
- package/dist/lib/map/integrations/map-display-option.svelte.d.ts +7 -0
- package/dist/lib/map/integrations/map-display-option.svelte.js +10 -18
- package/dist/lib/map/integrations/map-geojson-integration.svelte.d.ts +13 -0
- package/dist/lib/map/integrations/map-geojson-integration.svelte.js +21 -17
- package/dist/lib/map/integrations/map-icon-manager.d.ts +15 -0
- package/dist/lib/map/integrations/map-icon-manager.js +52 -46
- package/dist/lib/map/integrations/map-integration.svelte.d.ts +6 -0
- package/dist/lib/map/integrations/map-integration.svelte.js +2 -5
- package/dist/lib/map/integrations/map-layer-integration.svelte.d.ts +11 -0
- package/dist/lib/map/integrations/map-layer-integration.svelte.js +36 -23
- package/dist/lib/map/integrations/tooltip.svelte.d.ts +28 -0
- package/dist/lib/map/integrations/tooltip.svelte.js +120 -78
- package/dist/lib/map/integrations/types.d.ts +14 -0
- package/dist/lib/map/integrations/types.js +1 -0
- package/dist/lib/map/map.svelte.d.ts +14 -0
- package/dist/lib/map/map.svelte.js +48 -50
- package/dist/lib/map/utils.d.ts +7 -0
- package/dist/lib/map/utils.js +32 -29
- package/dist/lib/monitors/components/MonitorClusterTooltip.svelte +112 -0
- package/dist/lib/monitors/components/MonitorClusterTooltip.svelte.d.ts +7 -0
- package/dist/lib/monitors/components/MonitorMarkersLegend.svelte +41 -0
- package/dist/lib/monitors/components/MonitorMarkersLegend.svelte.d.ts +3 -0
- package/dist/lib/monitors/components/MonitorSubscriptionManager.svelte +128 -0
- package/dist/lib/monitors/components/MonitorSubscriptionManager.svelte.d.ts +6 -0
- package/dist/lib/monitors/components/MonitorTooltip.svelte +61 -0
- package/dist/lib/monitors/components/MonitorTooltip.svelte.d.ts +7 -0
- package/dist/lib/monitors/components/MonitorWidgetModal.svelte +100 -0
- package/dist/lib/monitors/components/MonitorWidgetModal.svelte.d.ts +6 -0
- package/dist/lib/monitors/components/MonitorsDisplayOptions.svelte +79 -0
- package/dist/lib/monitors/components/MonitorsDisplayOptions.svelte.d.ts +3 -0
- package/dist/lib/monitors/monitor-utils.d.ts +4 -0
- package/dist/lib/monitors/monitor-utils.js +33 -23
- package/dist/lib/monitors/monitors-cluster-renderer.d.ts +33 -0
- package/dist/lib/monitors/monitors-cluster-renderer.js +218 -209
- package/dist/lib/monitors/monitors-icon-manager.svelte.d.ts +13 -0
- package/dist/lib/monitors/monitors-icon-manager.svelte.js +75 -70
- package/dist/lib/monitors/monitors-map-integration.svelte.d.ts +40 -0
- package/dist/lib/monitors/monitors-map-integration.svelte.js +278 -270
- package/dist/lib/monitors/monitors.svelte.d.ts +16 -0
- package/dist/lib/monitors/monitors.svelte.js +38 -63
- package/dist/lib/monitors/types.d.ts +26 -0
- package/dist/lib/monitors/types.js +1 -0
- package/dist/lib/reactivity.svelte.d.ts +0 -0
- package/dist/lib/reactivity.svelte.js +83 -0
- package/dist/lib/router-context.d.ts +27 -0
- package/dist/lib/router-context.js +11 -11
- package/dist/lib/routes.d.ts +2 -0
- package/dist/lib/routes.js +10 -9
- package/dist/lib/search/Search.svelte +189 -0
- package/dist/lib/search/Search.svelte.d.ts +3 -0
- package/dist/lib/search/service.d.ts +17 -0
- package/dist/lib/search/service.js +75 -85
- package/dist/lib/utils.d.ts +13 -0
- package/dist/lib/utils.js +10 -12
- package/dist/lib/weather.d.ts +1 -0
- package/dist/lib/weather.js +11 -7
- package/dist/lib/wind/wind.svelte.d.ts +10 -0
- package/dist/lib/wind/wind.svelte.js +13 -21
- package/package.json +9 -7
- package/src/lib/LoadScreen.svelte +3 -3
- package/src/lib/hms/components/HMSFireLegend.svelte +1 -1
- package/src/lib/hms/hms.svelte.ts +8 -9
- package/src/lib/index.ts +18 -0
- package/src/lib/routes.ts +6 -1
- package/src/lib/utils.ts +1 -1
- package/dist/lib/LoadScreen.js +0 -73
- package/dist/lib/MainMapView.js +0 -7
- package/dist/lib/MapLegend.js +0 -13
- package/dist/lib/MonitorDetailPanel.js +0 -169
- package/dist/lib/MonitorMapLayout.js +0 -91
- package/dist/lib/_virtual/_rolldown/runtime.js +0 -11
- package/dist/lib/assets/logos/airgradient-blue.js +0 -4
- package/dist/lib/assets/logos/airnow-compact.js +0 -4
- package/dist/lib/assets/logos/carb-compact.js +0 -4
- package/dist/lib/assets/logos/purpleair-compact.js +0 -4
- package/dist/lib/assets/logos/sjvair.js +0 -4
- package/dist/lib/collocation-sites/CollocationTooltip.js +0 -105
- package/dist/lib/components/DataBox.js +0 -30
- package/dist/lib/components/DisplayOption.js +0 -10
- package/dist/lib/components/MapLayersDisplayOptions.js +0 -87
- package/dist/lib/components/SegmentedControl.js +0 -37
- package/dist/lib/components/ToggleSwitch.js +0 -17
- package/dist/lib/components/ui/button/button.js +0 -34
- package/dist/lib/components/ui/range-calendar/range-calendar-caption.js +0 -82
- package/dist/lib/components/ui/range-calendar/range-calendar-cell.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-day.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-body.js +0 -27
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-head.js +0 -27
- package/dist/lib/components/ui/range-calendar/range-calendar-grid-row.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-grid.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-head-cell.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-header.js +0 -35
- package/dist/lib/components/ui/range-calendar/range-calendar-month-select.js +0 -61
- package/dist/lib/components/ui/range-calendar/range-calendar-month.js +0 -25
- package/dist/lib/components/ui/range-calendar/range-calendar-months.js +0 -25
- package/dist/lib/components/ui/range-calendar/range-calendar-nav.js +0 -25
- package/dist/lib/components/ui/range-calendar/range-calendar-next-button.js +0 -58
- package/dist/lib/components/ui/range-calendar/range-calendar-prev-button.js +0 -58
- package/dist/lib/components/ui/range-calendar/range-calendar-year-select.js +0 -59
- package/dist/lib/components/ui/range-calendar/range-calendar.js +0 -272
- package/dist/lib/data-chart/DataChart.js +0 -142
- package/dist/lib/ev-stations/components/EvStationClusterTooltip.js +0 -16
- package/dist/lib/ev-stations/components/EvStationTooltip.js +0 -120
- package/dist/lib/ev-stations/components/EvStationsDisplayOptions.js +0 -41
- package/dist/lib/hms/components/HMSFireLegend.js +0 -35
- package/dist/lib/map/Map.js +0 -14
- package/dist/lib/map/MapStyleDisplayOptions.js +0 -43
- package/dist/lib/map/Menu.js +0 -44
- package/dist/lib/monitors/components/MonitorClusterTooltip.js +0 -83
- package/dist/lib/monitors/components/MonitorMarkersLegend.js +0 -35
- package/dist/lib/monitors/components/MonitorSubscriptionManager.js +0 -104
- package/dist/lib/monitors/components/MonitorTooltip.js +0 -59
- package/dist/lib/monitors/components/MonitorWidgetModal.js +0 -40
- package/dist/lib/monitors/components/MonitorsDisplayOptions.js +0 -76
- package/dist/lib/search/Search.js +0 -124
- package/dist/lib/sjvair-air.avif +0 -0
- package/dist/lib/sjvair-air.png +0 -0
- package/dist/lib/sjvair-air.webp +0 -0
- package/dist/lib/sjvair-air2.avif +0 -0
- package/dist/lib/sjvair-air2.png +0 -0
- package/dist/lib/sjvair-air2.webp +0 -0
- package/dist/lib/sjvair-icon.avif +0 -0
- package/dist/lib/sjvair-icon.png +0 -0
- package/dist/lib/sjvair-icon.webp +0 -0
- package/dist/lib/sjvair-icon2.avif +0 -0
- package/dist/lib/sjvair-icon2.png +0 -0
- package/dist/lib/sjvair-icon2.webp +0 -0
- package/dist/lib/sjvair-sjv.avif +0 -0
- package/dist/lib/sjvair-sjv.png +0 -0
- package/dist/lib/sjvair-sjv.webp +0 -0
- package/dist/lib/sjvair-sjv2.avif +0 -0
- package/dist/lib/sjvair-sjv2.png +0 -0
- package/dist/lib/sjvair-sjv2.webp +0 -0
|
@@ -1,90 +1,80 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
url: a,
|
|
26
|
-
alt: "Central California Asthma Collaborative"
|
|
27
|
-
};
|
|
28
|
-
case "AirGradient": return {
|
|
29
|
-
url: t,
|
|
30
|
-
alt: "AirGradient"
|
|
31
|
-
};
|
|
32
|
-
default: return console.warn(`[search] Unknown data source: ${e.data_source.name}`), {
|
|
33
|
-
url: "",
|
|
34
|
-
alt: ""
|
|
35
|
-
};
|
|
36
|
-
}
|
|
1
|
+
import { geocoding } from "@maptiler/sdk";
|
|
2
|
+
import { monitorsManager } from "../monitors/monitors.svelte";
|
|
3
|
+
import AirGradientLogo from "../assets/logos/airgradient-blue.svg";
|
|
4
|
+
import AirNowLogo from "../assets/logos/airnow-compact.jpg";
|
|
5
|
+
import CarbLogo from "../assets/logos/carb-compact.jpg";
|
|
6
|
+
import PurpleairLogo from "../assets/logos/purpleair-compact.png";
|
|
7
|
+
import SJVAirLogo from "../assets/logos/sjvair.svg";
|
|
8
|
+
const SJV_CENTER = [-119.8, 36.76];
|
|
9
|
+
function getMonitorLogo(monitor) {
|
|
10
|
+
switch (monitor.data_source.name) {
|
|
11
|
+
case "AQview":
|
|
12
|
+
return { url: CarbLogo, alt: "AQview" };
|
|
13
|
+
case "AirNow.gov":
|
|
14
|
+
return { url: AirNowLogo, alt: "AirNow.gov" };
|
|
15
|
+
case "PurpleAir":
|
|
16
|
+
return { url: PurpleairLogo, alt: "PurpleAir" };
|
|
17
|
+
case "Central California Asthma Collaborative":
|
|
18
|
+
return { url: SJVAirLogo, alt: "Central California Asthma Collaborative" };
|
|
19
|
+
case "AirGradient":
|
|
20
|
+
return { url: AirGradientLogo, alt: "AirGradient" };
|
|
21
|
+
default:
|
|
22
|
+
console.warn(`[search] Unknown data source: ${monitor.data_source.name}`);
|
|
23
|
+
return { url: "", alt: "" };
|
|
24
|
+
}
|
|
37
25
|
}
|
|
38
|
-
|
|
39
|
-
function
|
|
40
|
-
|
|
26
|
+
let proximityCache = null;
|
|
27
|
+
function getProximity() {
|
|
28
|
+
return (proximityCache ??= resolveProximity());
|
|
41
29
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
function resolveProximity() {
|
|
31
|
+
return new Promise((resolve) => {
|
|
32
|
+
if (!navigator.geolocation) {
|
|
33
|
+
resolve(SJV_CENTER);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const timeout = setTimeout(() => resolve(SJV_CENTER), 3000);
|
|
37
|
+
navigator.geolocation.getCurrentPosition((pos) => {
|
|
38
|
+
clearTimeout(timeout);
|
|
39
|
+
resolve([pos.coords.longitude, pos.coords.latitude]);
|
|
40
|
+
}, () => {
|
|
41
|
+
clearTimeout(timeout);
|
|
42
|
+
resolve(SJV_CENTER);
|
|
43
|
+
});
|
|
44
|
+
});
|
|
55
45
|
}
|
|
56
|
-
async function
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
46
|
+
export async function monitorSearch(query) {
|
|
47
|
+
if (!monitorsManager.latest)
|
|
48
|
+
return [];
|
|
49
|
+
const normalized = query.toLowerCase();
|
|
50
|
+
const exact = [];
|
|
51
|
+
const prefix = [];
|
|
52
|
+
const substr = [];
|
|
53
|
+
for (const monitor of monitorsManager.latest.values()) {
|
|
54
|
+
const name = monitor.name.toLowerCase();
|
|
55
|
+
if (name === normalized)
|
|
56
|
+
exact.push(monitor);
|
|
57
|
+
else if (name.startsWith(normalized))
|
|
58
|
+
prefix.push(monitor);
|
|
59
|
+
else if (name.includes(normalized))
|
|
60
|
+
substr.push(monitor);
|
|
61
|
+
}
|
|
62
|
+
return [...exact, ...prefix, ...substr]
|
|
63
|
+
.slice(0, 4)
|
|
64
|
+
.map((monitor) => ({ type: "monitor", monitor, logo: getMonitorLogo(monitor) }));
|
|
72
65
|
}
|
|
73
|
-
async function
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
}
|
|
66
|
+
export async function geocode(query) {
|
|
67
|
+
const proximity = await getProximity();
|
|
68
|
+
try {
|
|
69
|
+
const result = await geocoding.forward(query, {
|
|
70
|
+
country: ["us"],
|
|
71
|
+
fuzzyMatch: true,
|
|
72
|
+
limit: 4,
|
|
73
|
+
proximity
|
|
74
|
+
});
|
|
75
|
+
return result.features.map((feature) => ({ type: "geocode", feature }));
|
|
76
|
+
}
|
|
77
|
+
catch {
|
|
78
|
+
return [];
|
|
79
|
+
}
|
|
88
80
|
}
|
|
89
|
-
//#endregion
|
|
90
|
-
export { p as geocode, f as monitorSearch };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ClassValue } from "clsx";
|
|
2
|
+
export declare function cn(...inputs: ClassValue[]): string;
|
|
3
|
+
export type WithoutChild<T> = T extends {
|
|
4
|
+
child?: any;
|
|
5
|
+
} ? Omit<T, "child"> : T;
|
|
6
|
+
export type WithoutChildren<T> = T extends {
|
|
7
|
+
children?: any;
|
|
8
|
+
} ? Omit<T, "children"> : T;
|
|
9
|
+
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
|
10
|
+
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & {
|
|
11
|
+
ref?: U | null;
|
|
12
|
+
};
|
|
13
|
+
export declare function debounce<T extends (...args: unknown[]) => void>(fn: T, wait: number): (...args: Parameters<T>) => void;
|
package/dist/lib/utils.js
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { clsx
|
|
2
|
-
import { twMerge
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return t(e(n));
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
export function cn(...inputs) {
|
|
4
|
+
return twMerge(clsx(inputs));
|
|
6
5
|
}
|
|
7
|
-
function
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
export function debounce(fn, wait) {
|
|
7
|
+
let timer;
|
|
8
|
+
return (...args) => {
|
|
9
|
+
clearTimeout(timer);
|
|
10
|
+
timer = setTimeout(() => fn(...args), wait);
|
|
11
|
+
};
|
|
12
12
|
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { n as cn, r as debounce };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fetchTempByCoords(coords: [number, number] | Array<number>): Promise<number>;
|
package/dist/lib/weather.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export async function fetchTempByCoords(coords) {
|
|
2
|
+
if (coords.length !== 2) {
|
|
3
|
+
throw new Error("Invalid coordinates provided for fetching temperature");
|
|
4
|
+
}
|
|
5
|
+
const url = `https://api.weather.gov/points/${coords.toReversed().join(",")}`;
|
|
6
|
+
return fetch(url)
|
|
7
|
+
.then((res) => res.json())
|
|
8
|
+
.then(async (data) => {
|
|
9
|
+
const forecast = await fetch(data.properties.forecastHourly).then((res) => res.json());
|
|
10
|
+
return forecast.properties.periods[0].temperature;
|
|
11
|
+
});
|
|
6
12
|
}
|
|
7
|
-
//#endregion
|
|
8
|
-
export { e as fetchTempByCoords };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Map as MaptilerMap } from "@maptiler/sdk";
|
|
2
|
+
import { MapLayerIntegration } from "../map/integrations/map-layer-integration.svelte.ts";
|
|
3
|
+
declare class WindMapIntegration extends MapLayerIntegration {
|
|
4
|
+
referenceId: string;
|
|
5
|
+
beforeLayer: string;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
mapLayer: Parameters<MaptilerMap["addLayer"]>[0];
|
|
8
|
+
}
|
|
9
|
+
export declare const windMapIntegration: WindMapIntegration;
|
|
10
|
+
export type { WindMapIntegration };
|
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { baseLayerSeperator
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
mapLayer = new r({
|
|
16
|
-
id: this.referenceId,
|
|
17
|
-
opacity: .5
|
|
18
|
-
});
|
|
19
|
-
}();
|
|
20
|
-
//#endregion
|
|
21
|
-
export { i as windMapIntegration };
|
|
1
|
+
import { WindLayer } from "@maptiler/weather";
|
|
2
|
+
import { baseLayerSeperator } from "../map/integrations/base-layer-seperator.ts";
|
|
3
|
+
import { MapLayerIntegration } from "../map/integrations/map-layer-integration.svelte.ts";
|
|
4
|
+
class WindMapIntegration extends MapLayerIntegration {
|
|
5
|
+
referenceId = "MapTiler Wind";
|
|
6
|
+
beforeLayer = baseLayerSeperator.referenceId;
|
|
7
|
+
enabled = $state(false);
|
|
8
|
+
mapLayer = new WindLayer({
|
|
9
|
+
id: this.referenceId,
|
|
10
|
+
opacity: 0.5
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export const windMapIntegration = new WindMapIntegration();
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sjvair/monitor-map",
|
|
3
3
|
"description": "SJVAir's interactive monitor map",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.5",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite dev",
|
|
7
7
|
"build:local": "PROD_MODE=local vite build",
|
|
8
8
|
"build": "PROD_MODE=production vite build",
|
|
9
|
-
"build:lib": "
|
|
9
|
+
"build:lib": "PROD_MODE=local svelte-package -i src/lib -o dist/lib",
|
|
10
10
|
"preview": "vite preview",
|
|
11
11
|
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
12
12
|
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
|
@@ -14,13 +14,13 @@
|
|
|
14
14
|
"lint": "prettier --check . && eslint ."
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
|
-
"svelte": "./
|
|
18
|
-
"types": "./
|
|
17
|
+
"svelte": "./dist/lib/index.js",
|
|
18
|
+
"types": "./dist/lib/index.d.ts",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
-
"svelte": "./
|
|
22
|
-
"types": "./
|
|
23
|
-
"default": "./
|
|
21
|
+
"svelte": "./dist/lib/index.js",
|
|
22
|
+
"types": "./dist/lib/index.d.ts",
|
|
23
|
+
"default": "./dist/lib/index.js"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"files": [
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"**/*.css"
|
|
32
32
|
],
|
|
33
33
|
"peerDependencies": {
|
|
34
|
+
"@sveltejs/enhanced-img": "^0.11.0",
|
|
34
35
|
"sv-router": "^0.16.2",
|
|
35
36
|
"svelte": "^5.0.0"
|
|
36
37
|
},
|
|
@@ -39,6 +40,7 @@
|
|
|
39
40
|
"@eslint/js": "^10.0.1",
|
|
40
41
|
"@fontsource-variable/inter": "^5.2.8",
|
|
41
42
|
"@sveltejs/enhanced-img": "^0.11.0",
|
|
43
|
+
"@sveltejs/package": "^2.5.8",
|
|
42
44
|
"@sveltejs/vite-plugin-svelte": "^7.2.0",
|
|
43
45
|
"@tailwindcss/vite": "^4.3.2",
|
|
44
46
|
"@types/node": "^26.1.1",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
>
|
|
38
38
|
<div class="flex justify-around gap-4">
|
|
39
39
|
<enhanced:img
|
|
40
|
-
src="
|
|
40
|
+
src="./assets/logos/sjvair-parts/sjvair-icon.webp"
|
|
41
41
|
alt="SJVAir Icon"
|
|
42
42
|
class="icon inline-block h-24! w-auto! transition-all duration-500 ease-out object-contain"
|
|
43
43
|
class:translate-x-0={loadScreenState.entered}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
class:opacity-0={!loadScreenState.entered}
|
|
47
47
|
/>
|
|
48
48
|
<enhanced:img
|
|
49
|
-
src="
|
|
49
|
+
src="./assets/logos/sjvair-parts/sjvair-sjv.webp"
|
|
50
50
|
alt="SJV"
|
|
51
51
|
class="sjv inline-block h-24! w-auto! transition-all duration-500 ease-out object-contain"
|
|
52
52
|
class:translate-y-0={loadScreenState.entered}
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
class:opacity-0={!loadScreenState.entered}
|
|
56
56
|
/>
|
|
57
57
|
<enhanced:img
|
|
58
|
-
src="
|
|
58
|
+
src="./assets/logos/sjvair-parts/sjvair-air.webp"
|
|
59
59
|
alt="Air"
|
|
60
60
|
class="air inline-block h-24! w-auto! transition-all duration-500 ease-out object-contain"
|
|
61
61
|
class:translate-y-0={loadScreenState.entered}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
<div class="flex flex-col bg-white rounded shadow w-fit p-1">
|
|
9
9
|
<p class="text-center whitespace-nowrap font-semibold">Fire Points</p>
|
|
10
10
|
<div class="flex flex-col">
|
|
11
|
-
{#each hmsFireMapIntegration.icons.iter as [
|
|
11
|
+
{#each hmsFireMapIntegration.icons.iter as [, icon], idx (idx)}
|
|
12
12
|
<div class="flex gap-1 items-center">
|
|
13
13
|
<div class="size-9 flex justify-center items-center">
|
|
14
14
|
<img src={icon.image.src} alt={icon.image.alt} />
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
} from "@sjvair/sdk/hms";
|
|
7
7
|
import clustersDbscan from "@turf/clusters-dbscan";
|
|
8
8
|
import { featureCollection, point } from "@turf/helpers";
|
|
9
|
-
import { SvelteMap } from "svelte/reactivity";
|
|
10
9
|
|
|
11
10
|
const HMS_FIRE_DBSCAN_EPSILON = 2;
|
|
12
11
|
const HMS_FIRE_DBSCAN_MIN_POINTS = 1;
|
|
@@ -47,16 +46,16 @@ class HmsManager {
|
|
|
47
46
|
function deduplicateByCoordinates(
|
|
48
47
|
fires: (HMSFireGeoJSON & { frp: number })[]
|
|
49
48
|
): (HMSFireGeoJSON & { frp: number })[] {
|
|
50
|
-
const latest
|
|
49
|
+
const latest: Record<string, HMSFireGeoJSON & { frp: number }> = {};
|
|
51
50
|
for (const fire of fires) {
|
|
52
51
|
const [lng, lat] = fire.geometry.coordinates as [number, number];
|
|
53
52
|
const key = `${lng},${lat}`;
|
|
54
|
-
const existing = latest
|
|
53
|
+
const existing = latest[key];
|
|
55
54
|
if (!existing || fire.timestamp > existing.timestamp) {
|
|
56
|
-
latest
|
|
55
|
+
latest[key] = fire;
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
|
-
return
|
|
58
|
+
return Object.values(latest);
|
|
60
59
|
}
|
|
61
60
|
|
|
62
61
|
function computeFireGroups(fires: (HMSFireGeoJSON & { frp: number })[]): HMSFireGroup[] {
|
|
@@ -73,7 +72,7 @@ function computeFireGroups(fires: (HMSFireGeoJSON & { frp: number })[]): HMSFire
|
|
|
73
72
|
units: "kilometers"
|
|
74
73
|
});
|
|
75
74
|
|
|
76
|
-
const groups
|
|
75
|
+
const groups: Record<string, { frps: number[]; lngs: number[]; lats: number[] }> = {};
|
|
77
76
|
|
|
78
77
|
for (const feature of clustered.features) {
|
|
79
78
|
const props = feature.properties as {
|
|
@@ -86,14 +85,14 @@ function computeFireGroups(fires: (HMSFireGeoJSON & { frp: number })[]): HMSFire
|
|
|
86
85
|
// This branch activates correctly if minPoints is raised above 1 in future.
|
|
87
86
|
const key = props.dbscan === "noise" ? `noise-${props.fireId}` : `cluster-${props.cluster}`;
|
|
88
87
|
const [lng, lat] = feature.geometry.coordinates as [number, number];
|
|
89
|
-
const entry = groups
|
|
88
|
+
const entry = groups[key] ?? { frps: [], lngs: [], lats: [] };
|
|
90
89
|
entry.frps.push(props.frp);
|
|
91
90
|
entry.lngs.push(lng);
|
|
92
91
|
entry.lats.push(lat);
|
|
93
|
-
groups
|
|
92
|
+
groups[key] = entry;
|
|
94
93
|
}
|
|
95
94
|
|
|
96
|
-
return
|
|
95
|
+
return Object.entries(groups).map(([key, { frps, lngs, lats }]) => ({
|
|
97
96
|
id: `hms-fire-group-${key}`,
|
|
98
97
|
coordinates: [
|
|
99
98
|
lngs.reduce((s, v) => s + v, 0) / lngs.length,
|
package/src/lib/index.ts
CHANGED
|
@@ -37,14 +37,21 @@ export { monitorsManager } from "./monitors/monitors.svelte";
|
|
|
37
37
|
export type { MonitorsManager } from "./monitors/monitors.svelte";
|
|
38
38
|
export { collocationSitesManager } from "./collocation-sites/collocations.svelte";
|
|
39
39
|
export type { CollocationSitesManager } from "./collocation-sites/collocations.svelte";
|
|
40
|
+
export { evStationsManager } from "./ev-stations/ev-stations.svelte";
|
|
41
|
+
export type { EvStationsManager } from "./ev-stations/ev-stations.svelte";
|
|
42
|
+
export { hmsManager } from "./hms/hms.svelte";
|
|
43
|
+
export type { HMSManager } from "./hms/hms.svelte";
|
|
40
44
|
export { mapManager, DefaultMapStyle, initializeMap } from "./map/map.svelte";
|
|
41
45
|
export type { MapManager } from "./map/map.svelte";
|
|
42
46
|
|
|
43
47
|
// Map integrations
|
|
44
48
|
export { monitorsMapIntegration } from "./monitors/monitors-map-integration.svelte.ts";
|
|
45
49
|
export { collocationSitesMapIntegration } from "./collocation-sites/collocations-map-integration.svelte.ts";
|
|
50
|
+
export { evStationsMapIntegration } from "./ev-stations/ev-stations-map-integration.svelte.ts";
|
|
46
51
|
export { windMapIntegration } from "./wind/wind.svelte";
|
|
47
52
|
export { baseLayerSeperator } from "./map/integrations/base-layer-seperator";
|
|
53
|
+
export { hmsFireMapIntegration } from "./hms/hms-fire-map-integration.svelte.ts";
|
|
54
|
+
export { hmsSmokeMapIntegration } from "./hms/hms-smoke-map-integration.svelte.ts";
|
|
48
55
|
|
|
49
56
|
// Components
|
|
50
57
|
export { default as Map } from "./map/Map.svelte";
|
|
@@ -57,6 +64,7 @@ export {
|
|
|
57
64
|
} from "./LoadScreen.svelte";
|
|
58
65
|
export type { LoadScreenState } from "./LoadScreen.svelte";
|
|
59
66
|
export { default as MonitorsDisplayOptions } from "./monitors/components/MonitorsDisplayOptions.svelte";
|
|
67
|
+
export { default as EvStationsDisplayOptions } from "./ev-stations/components/EvStationsDisplayOptions.svelte";
|
|
60
68
|
export { default as MapLayersDisplayOptions } from "./components/MapLayersDisplayOptions.svelte";
|
|
61
69
|
export { default as MapStyleDisplayOptions } from "./map/MapStyleDisplayOptions.svelte";
|
|
62
70
|
export { default as ToggleSwitch } from "./components/ToggleSwitch.svelte";
|
|
@@ -71,6 +79,10 @@ export { MapIconLayerIntegration as MapGeoJSONIntegration } from "./map/integrat
|
|
|
71
79
|
export type { SomeMapIntegration } from "./map/integrations/types";
|
|
72
80
|
export type { MonitorsMapIntegration } from "./monitors/monitors-map-integration.svelte.ts";
|
|
73
81
|
export type { WindMapIntegration } from "./wind/wind.svelte.ts";
|
|
82
|
+
export type { EvStationsMapIntegration } from "./ev-stations/ev-stations-map-integration.svelte.ts";
|
|
83
|
+
export type { HMSFireMapIntegration } from "./hms/hms-fire-map-integration.svelte.ts";
|
|
84
|
+
export type { HMSSmokeMapIntegration } from "./hms/hms-smoke-map-integration.svelte.ts";
|
|
85
|
+
export type { HMSFireGroup } from "./hms/hms.svelte.ts";
|
|
74
86
|
export type {
|
|
75
87
|
MonitorMapFeature,
|
|
76
88
|
MonitorMarkerProperties,
|
|
@@ -81,3 +93,9 @@ export type {
|
|
|
81
93
|
CollocationSiteMapFeature,
|
|
82
94
|
CollocationSiteMarkerProperties
|
|
83
95
|
} from "./collocation-sites/types";
|
|
96
|
+
export type {
|
|
97
|
+
EvStation,
|
|
98
|
+
EvStationMarkerProperties,
|
|
99
|
+
EvStationMapFeature,
|
|
100
|
+
EvStationClusterMapFeature
|
|
101
|
+
} from "./ev-stations/types";
|
package/src/lib/routes.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { Routes } from "sv-router";
|
|
1
2
|
import MonitorMapLayout from "./MonitorMapLayout.svelte";
|
|
2
3
|
import MainMapView from "./MainMapView.svelte";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
// Explicitly typed as sv-router's own `Routes` so declaration emission doesn't
|
|
6
|
+
// need to name svelte2tsx's internal per-component prop types (see
|
|
7
|
+
// MonitorMapLayout/MainMapView.svelte) and so this stays assignable to
|
|
8
|
+
// `createRouter`'s `Routes`-constrained parameter in a host app's router.ts.
|
|
9
|
+
export const monitorMapRoutes: Routes = {
|
|
5
10
|
layout: MonitorMapLayout,
|
|
6
11
|
"/": MainMapView,
|
|
7
12
|
"/monitor/:id": () => import("./MonitorDetailPanel.svelte")
|
package/src/lib/utils.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type WithoutChildren<T> = T extends { children?: any } ? Omit<T, "childre
|
|
|
12
12
|
export type WithoutChildrenOrChild<T> = WithoutChildren<WithoutChild<T>>;
|
|
13
13
|
export type WithElementRef<T, U extends HTMLElement = HTMLElement> = T & { ref?: U | null };
|
|
14
14
|
|
|
15
|
-
export function debounce<T extends (...args:
|
|
15
|
+
export function debounce<T extends (...args: unknown[]) => void>(
|
|
16
16
|
fn: T,
|
|
17
17
|
wait: number
|
|
18
18
|
): (...args: Parameters<T>) => void {
|
package/dist/lib/LoadScreen.js
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import "svelte/internal/disclose-version";
|
|
2
|
-
import * as e from "svelte/internal/client";
|
|
3
|
-
//#region src/lib/LoadScreen.svelte
|
|
4
|
-
var t = e.proxy({
|
|
5
|
-
enabled: !0,
|
|
6
|
-
entered: !1
|
|
7
|
-
});
|
|
8
|
-
function n() {
|
|
9
|
-
t.enabled ||= !0;
|
|
10
|
-
}
|
|
11
|
-
function r() {
|
|
12
|
-
t.enabled &&= !1;
|
|
13
|
-
}
|
|
14
|
-
var i = e.from_html("<div class=\"absolute top-0 left-0 z-50 flex h-full w-full items-center justify-center overflow-hidden bg-white\"><div class=\"flex justify-around gap-4\"><picture><source type=\"image/avif\"/><source type=\"image/webp\"/><source type=\"image/png\"/><img alt=\"SJVAir Icon\" width=\"458\" height=\"458\"/></picture> <picture><source type=\"image/avif\"/><source type=\"image/webp\"/><source type=\"image/png\"/><img alt=\"SJV\" width=\"755\" height=\"458\"/></picture> <picture><source type=\"image/avif\"/><source type=\"image/webp\"/><source type=\"image/png\"/><img alt=\"Air\" width=\"469\" height=\"458\"/></picture></div></div>");
|
|
15
|
-
function a(n) {
|
|
16
|
-
let r = () => {
|
|
17
|
-
t.entered = !0;
|
|
18
|
-
};
|
|
19
|
-
var a = e.comment(), o = e.first_child(a), s = (n) => {
|
|
20
|
-
var a = i(), o = e.child(a), s = e.child(o), c = e.child(s);
|
|
21
|
-
e.set_attribute(c, "srcset", "/sjvair-icon.avif 1x, /sjvair-icon2.avif 2x");
|
|
22
|
-
var l = e.sibling(c);
|
|
23
|
-
e.set_attribute(l, "srcset", "/sjvair-icon.webp 1x, /sjvair-icon2.webp 2x");
|
|
24
|
-
var u = e.sibling(l);
|
|
25
|
-
e.set_attribute(u, "srcset", "/sjvair-icon.png 1x, /sjvair-icon2.png 2x");
|
|
26
|
-
var d = e.sibling(u);
|
|
27
|
-
e.set_attribute(d, "src", "/sjvair-icon2.png");
|
|
28
|
-
let f;
|
|
29
|
-
e.reset(s);
|
|
30
|
-
var p = e.sibling(s, 2), m = e.child(p);
|
|
31
|
-
e.set_attribute(m, "srcset", "/sjvair-sjv.avif 1x, /sjvair-sjv2.avif 1.9973544973544974x");
|
|
32
|
-
var h = e.sibling(m);
|
|
33
|
-
e.set_attribute(h, "srcset", "/sjvair-sjv.webp 1x, /sjvair-sjv2.webp 1.9973544973544974x");
|
|
34
|
-
var g = e.sibling(h);
|
|
35
|
-
e.set_attribute(g, "srcset", "/sjvair-sjv.png 1x, /sjvair-sjv2.png 1.9973544973544974x");
|
|
36
|
-
var _ = e.sibling(g);
|
|
37
|
-
e.set_attribute(_, "src", "/sjvair-sjv2.png");
|
|
38
|
-
let v;
|
|
39
|
-
e.reset(p);
|
|
40
|
-
var y = e.sibling(p, 2), b = e.child(y);
|
|
41
|
-
e.set_attribute(b, "srcset", "/sjvair-air.avif 1x, /sjvair-air2.avif 1.995744680851064x");
|
|
42
|
-
var x = e.sibling(b);
|
|
43
|
-
e.set_attribute(x, "srcset", "/sjvair-air.webp 1x, /sjvair-air2.webp 1.995744680851064x");
|
|
44
|
-
var S = e.sibling(x);
|
|
45
|
-
e.set_attribute(S, "srcset", "/sjvair-air.png 1x, /sjvair-air2.png 1.995744680851064x");
|
|
46
|
-
var C = e.sibling(S);
|
|
47
|
-
e.set_attribute(C, "src", "/sjvair-air2.png");
|
|
48
|
-
let w;
|
|
49
|
-
e.reset(y), e.reset(o), e.reset(a), e.attach(a, () => r), e.template_effect(() => {
|
|
50
|
-
f = e.set_class(d, 1, "icon inline-block h-24! w-auto! transition-all duration-500 ease-out object-contain", null, f, {
|
|
51
|
-
"translate-x-0": t.entered,
|
|
52
|
-
"-translate-x-full": !t.entered,
|
|
53
|
-
"opacity-100": t.entered,
|
|
54
|
-
"opacity-0": !t.entered
|
|
55
|
-
}), v = e.set_class(_, 1, "sjv inline-block h-24! w-auto! transition-all duration-500 ease-out object-contain", null, v, {
|
|
56
|
-
"translate-y-0": t.entered,
|
|
57
|
-
"-translate-y-full": !t.entered,
|
|
58
|
-
"opacity-100": t.entered,
|
|
59
|
-
"opacity-0": !t.entered
|
|
60
|
-
}), w = e.set_class(C, 1, "air inline-block h-24! w-auto! transition-all duration-500 ease-out object-contain", null, w, {
|
|
61
|
-
"translate-y-0": t.entered,
|
|
62
|
-
"translate-y-full": !t.entered,
|
|
63
|
-
"opacity-100": t.entered,
|
|
64
|
-
"opacity-0": !t.entered
|
|
65
|
-
});
|
|
66
|
-
}), e.append(n, a);
|
|
67
|
-
};
|
|
68
|
-
e.if(o, (e) => {
|
|
69
|
-
t.enabled && e(s);
|
|
70
|
-
}), e.append(n, a);
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
|
-
export { a as default, r as disable, n as enable, t as loadScreenState };
|
package/dist/lib/MainMapView.js
DELETED
package/dist/lib/MapLegend.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import e from "./monitors/components/MonitorMarkersLegend.js";
|
|
2
|
-
import t from "./hms/components/HMSFireLegend.js";
|
|
3
|
-
import "svelte/internal/disclose-version";
|
|
4
|
-
import * as n from "svelte/internal/client";
|
|
5
|
-
import "svelte/internal/flags/legacy";
|
|
6
|
-
//#region src/lib/MapLegend.svelte
|
|
7
|
-
var r = n.from_html("<div class=\"flex flex-col gap-1 pointer-events-none pl-4 pb-4\"><!> <!></div>");
|
|
8
|
-
function i(i) {
|
|
9
|
-
var a = r(), o = n.child(a);
|
|
10
|
-
t(o, {}), e(n.sibling(o, 2), {}), n.reset(a), n.append(i, a);
|
|
11
|
-
}
|
|
12
|
-
//#endregion
|
|
13
|
-
export { i as default };
|