@sjvair/map-sdk 0.0.0-stage → 0.1.0-beta.10
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/LICENSE +21 -0
- package/README.md +713 -2
- package/dist/core/basemap.svelte.d.ts +38 -0
- package/dist/core/basemap.svelte.js +163 -0
- package/dist/core/context.d.ts +5 -0
- package/dist/core/context.js +13 -0
- package/dist/core/create-map.svelte.d.ts +274 -0
- package/dist/core/create-map.svelte.js +591 -0
- package/dist/core/gl.d.ts +97 -0
- package/dist/core/gl.js +1 -0
- package/dist/core/interactions.svelte.d.ts +50 -0
- package/dist/core/interactions.svelte.js +330 -0
- package/dist/core/plugin-host.svelte.d.ts +71 -0
- package/dist/core/plugin-host.svelte.js +445 -0
- package/dist/core/plugin.d.ts +190 -0
- package/dist/core/plugin.js +1 -0
- package/dist/core/scoped-context.d.ts +7 -0
- package/dist/core/scoped-context.js +34 -0
- package/dist/core/shape-view.d.ts +27 -0
- package/dist/core/shape-view.js +323 -0
- package/dist/data/format.d.ts +10 -0
- package/dist/data/format.js +37 -0
- package/dist/data/index.d.ts +9 -0
- package/dist/data/index.js +9 -0
- package/dist/data/messages/en.json +61 -0
- package/dist/data/messages.d.ts +10 -0
- package/dist/data/messages.js +17 -0
- package/dist/data/metadata.d.ts +22 -0
- package/dist/data/metadata.js +110 -0
- package/dist/data/refs.d.ts +18 -0
- package/dist/data/refs.js +61 -0
- package/dist/data/scale-types.d.ts +7 -0
- package/dist/data/scale-types.js +1 -0
- package/dist/data/scale.d.ts +13 -0
- package/dist/data/scale.js +27 -0
- package/dist/data/selection.d.ts +13 -0
- package/dist/data/selection.js +52 -0
- package/dist/data/static-source.d.ts +4 -0
- package/dist/data/static-source.js +3 -0
- package/dist/data/types.d.ts +74 -0
- package/dist/data/types.js +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.js +42 -0
- package/dist/plugins/icons.d.ts +21 -0
- package/dist/plugins/icons.js +73 -0
- package/dist/plugins/points-clusters.d.ts +60 -0
- package/dist/plugins/points-clusters.js +93 -0
- package/dist/plugins/points.svelte.d.ts +105 -0
- package/dist/plugins/points.svelte.js +502 -0
- package/dist/plugins/scale-resolution.svelte.d.ts +27 -0
- package/dist/plugins/scale-resolution.svelte.js +111 -0
- package/dist/plugins/shapes.svelte.d.ts +34 -0
- package/dist/plugins/shapes.svelte.js +325 -0
- package/dist/plugins/shared.d.ts +6 -0
- package/dist/plugins/shared.js +18 -0
- package/dist/plugins/style.d.ts +57 -0
- package/dist/plugins/style.js +193 -0
- package/dist/presets/CollocationTooltip.svelte +132 -0
- package/dist/presets/CollocationTooltip.svelte.d.ts +16 -0
- package/dist/presets/FireTooltip.svelte +70 -0
- package/dist/presets/FireTooltip.svelte.d.ts +13 -0
- package/dist/presets/MonitorClusterTooltip.svelte +168 -0
- package/dist/presets/MonitorClusterTooltip.svelte.d.ts +16 -0
- package/dist/presets/MonitorReadingBox.svelte +58 -0
- package/dist/presets/MonitorReadingBox.svelte.d.ts +12 -0
- package/dist/presets/MonitorTooltip.svelte +88 -0
- package/dist/presets/MonitorTooltip.svelte.d.ts +20 -0
- package/dist/presets/calheatscore.d.ts +24 -0
- package/dist/presets/calheatscore.js +22 -0
- package/dist/presets/cluster-area.d.ts +13 -0
- package/dist/presets/cluster-area.js +34 -0
- package/dist/presets/collocation-sites.d.ts +18 -0
- package/dist/presets/collocation-sites.js +67 -0
- package/dist/presets/fire-groups.d.ts +26 -0
- package/dist/presets/fire-groups.js +51 -0
- package/dist/presets/forecast-zones.d.ts +25 -0
- package/dist/presets/forecast-zones.js +23 -0
- package/dist/presets/hms-fire.d.ts +30 -0
- package/dist/presets/hms-fire.js +86 -0
- package/dist/presets/hms-smoke.d.ts +20 -0
- package/dist/presets/hms-smoke.js +22 -0
- package/dist/presets/monitors.d.ts +48 -0
- package/dist/presets/monitors.js +243 -0
- package/dist/presets/reactive-props.svelte.d.ts +4 -0
- package/dist/presets/reactive-props.svelte.js +7 -0
- package/dist/presets/regions.d.ts +24 -0
- package/dist/presets/regions.js +22 -0
- package/dist/stores/abort.d.ts +16 -0
- package/dist/stores/abort.js +52 -0
- package/dist/stores/collocation-store.svelte.d.ts +25 -0
- package/dist/stores/collocation-store.svelte.js +72 -0
- package/dist/stores/hms-stores.svelte.d.ts +38 -0
- package/dist/stores/hms-stores.svelte.js +97 -0
- package/dist/stores/index.d.ts +4 -0
- package/dist/stores/index.js +4 -0
- package/dist/stores/load-once.svelte.d.ts +25 -0
- package/dist/stores/load-once.svelte.js +93 -0
- package/dist/stores/monitors-store.svelte.d.ts +85 -0
- package/dist/stores/monitors-store.svelte.js +340 -0
- package/dist/theme.css +34 -0
- package/dist/ui/FeatureList.svelte +501 -0
- package/dist/ui/FeatureList.svelte.d.ts +14 -0
- package/dist/ui/Legend.svelte +214 -0
- package/dist/ui/Legend.svelte.d.ts +22 -0
- package/dist/ui/LegendBar.svelte +161 -0
- package/dist/ui/LegendBar.svelte.d.ts +11 -0
- package/dist/ui/MapControls.svelte +135 -0
- package/dist/ui/MapControls.svelte.d.ts +11 -0
- package/dist/ui/MapTooltip.svelte +397 -0
- package/dist/ui/MapTooltip.svelte.d.ts +37 -0
- package/dist/ui/PickNotice.svelte +56 -0
- package/dist/ui/PickNotice.svelte.d.ts +7 -0
- package/dist/ui/SelectionBar.svelte +123 -0
- package/dist/ui/SelectionBar.svelte.d.ts +10 -0
- package/dist/ui/TooltipItem.svelte +66 -0
- package/dist/ui/TooltipItem.svelte.d.ts +11 -0
- package/dist/ui/ViewSummary.svelte +97 -0
- package/dist/ui/ViewSummary.svelte.d.ts +7 -0
- package/dist/ui/card.d.ts +29 -0
- package/dist/ui/card.js +1 -0
- package/dist/ui/controls.css +45 -0
- package/dist/ui/data-credits.svelte.d.ts +9 -0
- package/dist/ui/data-credits.svelte.js +52 -0
- package/dist/ui/feature-list.d.ts +46 -0
- package/dist/ui/feature-list.js +115 -0
- package/dist/ui/legend-data.d.ts +41 -0
- package/dist/ui/legend-data.js +40 -0
- package/dist/ui/level-chip.d.ts +11 -0
- package/dist/ui/level-chip.js +15 -0
- package/dist/ui/value-format.d.ts +8 -0
- package/dist/ui/value-format.js +20 -0
- package/dist/ui/view-summary.d.ts +11 -0
- package/dist/ui/view-summary.js +33 -0
- package/dist/view/MapView.svelte +443 -0
- package/dist/view/MapView.svelte.d.ts +51 -0
- package/dist/view/create-gl-map.d.ts +34 -0
- package/dist/view/create-gl-map.js +186 -0
- package/dist/view/list-placement.d.ts +21 -0
- package/dist/view/list-placement.js +13 -0
- package/package.json +104 -5
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { untrack } from "svelte";
|
|
2
|
+
import { AttributionControl, AttributionControlMLGL, Map as MaptilerMap, MapStyle, config as maptilerConfig } from "@maptiler/sdk";
|
|
3
|
+
import { themeSignature } from "../plugins/style.js";
|
|
4
|
+
/**
|
|
5
|
+
* Calls `onChange` when the host's theme changes the tokens map colors are read from: on a
|
|
6
|
+
* `prefers-color-scheme` change, or a `data-theme`, `class`, or `style` change on `<html>`.
|
|
7
|
+
* Changes that leave the tokens on `container` as they were (e.g. a scroll lock's inline style)
|
|
8
|
+
* are ignored. Returns the stop function.
|
|
9
|
+
*/
|
|
10
|
+
export function watchTheme(container, onChange) {
|
|
11
|
+
let last = themeSignature(container);
|
|
12
|
+
const check = () => {
|
|
13
|
+
const next = themeSignature(container);
|
|
14
|
+
if (next === last)
|
|
15
|
+
return;
|
|
16
|
+
last = next;
|
|
17
|
+
onChange();
|
|
18
|
+
};
|
|
19
|
+
const media = matchMedia("(prefers-color-scheme: dark)");
|
|
20
|
+
media.addEventListener("change", check);
|
|
21
|
+
const observer = new MutationObserver(check);
|
|
22
|
+
observer.observe(document.documentElement, {
|
|
23
|
+
attributes: true,
|
|
24
|
+
attributeFilter: ["data-theme", "class", "style"]
|
|
25
|
+
});
|
|
26
|
+
return () => {
|
|
27
|
+
media.removeEventListener("change", check);
|
|
28
|
+
observer.disconnect();
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** Today's live map: MapTiler Streets v4 and its variants, without the busy POI label layers. */
|
|
32
|
+
export function defaultBasemaps() {
|
|
33
|
+
const streets = MapStyle.STREETS_V4;
|
|
34
|
+
return {
|
|
35
|
+
// Style URLs, not variant objects: the basemap fallback matches a failed style by its URL.
|
|
36
|
+
styles: streets.getVariants().map((v) => ({ id: v.getId(), style: v.getExpandedStyleURL() })),
|
|
37
|
+
defaultId: streets.getDefaultVariant().getId(),
|
|
38
|
+
excludedLayers: ["Sport", "Tourism", "Culture", "Shopping", "Food", "Transport"]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A `transformRequest` that adds `key` to MapTiler API requests that have none. The SDK's own
|
|
43
|
+
* transform runs after it and only adds its global `config.apiKey` when `key` is missing, so
|
|
44
|
+
* each map's requests carry its own key, and two maps with different keys don't clash.
|
|
45
|
+
*/
|
|
46
|
+
export function maptilerKeyTransform(key) {
|
|
47
|
+
return (url) => {
|
|
48
|
+
let parsed;
|
|
49
|
+
try {
|
|
50
|
+
parsed = new URL(url);
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return { url };
|
|
54
|
+
}
|
|
55
|
+
if (parsed.host !== maptilerConfig.apiHost || parsed.searchParams.has("key"))
|
|
56
|
+
return { url };
|
|
57
|
+
parsed.searchParams.append("key", key);
|
|
58
|
+
return { url: parsed.href };
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/** MapLibre's own `setStyle`, which MapTiler's `Map` overrides. */
|
|
62
|
+
const clearStyle = Object.getPrototypeOf(MaptilerMap.prototype)
|
|
63
|
+
.setStyle;
|
|
64
|
+
/**
|
|
65
|
+
* MapLibre's `remove()` clears the style with `setStyle(null)`. MapTiler's `setStyle` turns
|
|
66
|
+
* `null` into its default Streets style when no style has loaded yet, so removing a map that is
|
|
67
|
+
* still loading (hiding it quickly) would request that style for nothing; and once one has
|
|
68
|
+
* loaded it keeps it, so the style's requests and worker sources outlive the map. `null` goes to
|
|
69
|
+
* MapLibre's `setStyle` instead (nothing else here passes `null`), and MapTiler's pending
|
|
70
|
+
* space and halo setup, which would read the cleared style, is marked done.
|
|
71
|
+
*/
|
|
72
|
+
class GlMap extends MaptilerMap {
|
|
73
|
+
/** Notes the SDK's own attribution control, which it adds while constructing the map. */
|
|
74
|
+
addControl(...args) {
|
|
75
|
+
const [control] = args;
|
|
76
|
+
if (control instanceof AttributionControlMLGL)
|
|
77
|
+
this.attribution = { control, credits: "[]" };
|
|
78
|
+
return super.addControl(...args);
|
|
79
|
+
}
|
|
80
|
+
setStyle(...args) {
|
|
81
|
+
if (args[0] !== null)
|
|
82
|
+
return super.setStyle(...args);
|
|
83
|
+
const pending = this
|
|
84
|
+
.spaceboxLoadingState;
|
|
85
|
+
if (pending)
|
|
86
|
+
pending.styleLoadedCallbackFired = true;
|
|
87
|
+
return clearStyle.apply(this, args);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* MapTiler's telemetry timer calls this 2 s after the map is created, even when it has been
|
|
91
|
+
* removed since (a map hidden quickly), and a removed map has no style to ask.
|
|
92
|
+
*/
|
|
93
|
+
isGlobeProjection() {
|
|
94
|
+
if (!this.style)
|
|
95
|
+
return false;
|
|
96
|
+
return super.isGlobeProjection();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/** The style of `ctx`'s current basemap. Throws when there is none, rather than letting MapTiler fall back to its own default style. */
|
|
100
|
+
function styleOf(ctx) {
|
|
101
|
+
const id = ctx.basemap.current;
|
|
102
|
+
const entry = ctx.config.basemaps?.styles.find((s) => s.id === id);
|
|
103
|
+
if (!entry)
|
|
104
|
+
throw new Error(`map-sdk: no basemap style for "${id}"`);
|
|
105
|
+
return entry.style;
|
|
106
|
+
}
|
|
107
|
+
function recordView(gl, ctx) {
|
|
108
|
+
const center = gl.getCenter();
|
|
109
|
+
const bounds = gl.getBounds();
|
|
110
|
+
ctx.updateView({
|
|
111
|
+
center: [center.lng, center.lat],
|
|
112
|
+
zoom: gl.getZoom(),
|
|
113
|
+
bearing: gl.getBearing(),
|
|
114
|
+
pitch: gl.getPitch()
|
|
115
|
+
}, {
|
|
116
|
+
west: bounds.getWest(),
|
|
117
|
+
south: bounds.getSouth(),
|
|
118
|
+
east: bounds.getEast(),
|
|
119
|
+
north: bounds.getNorth()
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Creates the MapTiler map for `ctx` in `container`, at `ctx`'s camera with its current basemap.
|
|
124
|
+
* Reads `ctx` untracked, so calling this in an effect doesn't make it depend on the camera or
|
|
125
|
+
* basemap. With `engineControls`, the MapTiler SDK adds its default zoom/compass and locate-me
|
|
126
|
+
* controls at the top right; they go with the map.
|
|
127
|
+
* Records the camera and bounds once the map loads and after every move.
|
|
128
|
+
*/
|
|
129
|
+
export function createGlMap(container, ctx, engineControls = false) {
|
|
130
|
+
const { camera, style } = untrack(() => ({ camera: ctx.camera, style: styleOf(ctx) }));
|
|
131
|
+
// Before the map exists, so its telemetry timer finds it off. Sessions stay on: MapTiler
|
|
132
|
+
// bills SDK maps by session, and without one every tile request counts on its own.
|
|
133
|
+
if (ctx.config.telemetry === false)
|
|
134
|
+
maptilerConfig.telemetry = false;
|
|
135
|
+
const gl = new GlMap({
|
|
136
|
+
container,
|
|
137
|
+
style,
|
|
138
|
+
center: camera.center,
|
|
139
|
+
zoom: camera.zoom,
|
|
140
|
+
bearing: camera.bearing,
|
|
141
|
+
pitch: camera.pitch,
|
|
142
|
+
// The key goes on each request, not on the SDK's global config (the `apiKey` option
|
|
143
|
+
// sets that global).
|
|
144
|
+
transformRequest: maptilerKeyTransform(ctx.config.maptilerKey),
|
|
145
|
+
cooperativeGestures: ctx.config.cooperativeGestures ?? false,
|
|
146
|
+
keyboard: true,
|
|
147
|
+
// The engine's attribution control (and MapTiler's logo, when the key's plan requires it),
|
|
148
|
+
// at its automatic size: full on wide maps, collapsed on narrow ones. The SDK's default is
|
|
149
|
+
// always full, so ask for its automatic mode.
|
|
150
|
+
attributionControl: { compact: "auto" },
|
|
151
|
+
// `controls: "engine"` gets the SDK's own zoom/compass and locate-me controls, with its
|
|
152
|
+
// defaults (as monitor-map has today); otherwise MapView draws the controls.
|
|
153
|
+
navigationControl: engineControls ? "top-right" : false,
|
|
154
|
+
geolocateControl: engineControls ? "top-right" : false,
|
|
155
|
+
logSDKVersion: false,
|
|
156
|
+
// Only when set, so a map without them gets today's constructor options.
|
|
157
|
+
...(ctx.config.projection ? { projection: ctx.config.projection } : {}),
|
|
158
|
+
...(ctx.config.space ? { space: ctx.config.space } : {})
|
|
159
|
+
});
|
|
160
|
+
gl.on("load", () => recordView(gl, ctx));
|
|
161
|
+
gl.on("moveend", () => recordView(gl, ctx));
|
|
162
|
+
return gl;
|
|
163
|
+
}
|
|
164
|
+
const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`);
|
|
165
|
+
/**
|
|
166
|
+
* Shows `credits` (plain text, one per dataset) in the map's attribution control, after the
|
|
167
|
+
* style's own credits. The control is replaced, not edited: MapLibre reads its custom
|
|
168
|
+
* attribution once. Does nothing for a map that isn't one of `createGlMap`'s or has no change.
|
|
169
|
+
*/
|
|
170
|
+
export function setDataCredits(gl, credits) {
|
|
171
|
+
const map = gl;
|
|
172
|
+
const current = map.attribution;
|
|
173
|
+
if (!current || !(map instanceof GlMap))
|
|
174
|
+
return;
|
|
175
|
+
const key = JSON.stringify(credits);
|
|
176
|
+
if (key === current.credits)
|
|
177
|
+
return;
|
|
178
|
+
map.removeControl(current.control);
|
|
179
|
+
map.attribution = null;
|
|
180
|
+
const next = new AttributionControl({
|
|
181
|
+
compact: undefined,
|
|
182
|
+
customAttribution: credits.map(escapeHtml)
|
|
183
|
+
});
|
|
184
|
+
map.addControl(next);
|
|
185
|
+
map.attribution = { control: next, credits: key };
|
|
186
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** A corner of the map. */
|
|
2
|
+
export type ListPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
3
|
+
/** `MapView`'s `featureList` options. */
|
|
4
|
+
export interface FeatureListOptions {
|
|
5
|
+
/** The corner the List button sits in; its panel opens from there. Default `"top-left"`. */
|
|
6
|
+
position?: ListPosition;
|
|
7
|
+
/**
|
|
8
|
+
* `"always"` (default) shows the button. `"focus"` shows it only while it, or its open panel,
|
|
9
|
+
* has keyboard focus, and the whole time the panel is open; otherwise it's visually hidden but
|
|
10
|
+
* stays in the Tab order and the accessibility tree, like a skip link.
|
|
11
|
+
*/
|
|
12
|
+
reveal?: "always" | "focus";
|
|
13
|
+
}
|
|
14
|
+
/** The `featureList` prop with its defaults filled in, or `null` when the list is off. */
|
|
15
|
+
export declare function resolveFeatureList(value: boolean | FeatureListOptions | undefined): Required<FeatureListOptions> | null;
|
|
16
|
+
/** A corner's edges, and the other corner on the same side (where the panel must stop). */
|
|
17
|
+
export declare function cornerSides(position: ListPosition): {
|
|
18
|
+
vertical: "top" | "bottom";
|
|
19
|
+
horizontal: "left" | "right";
|
|
20
|
+
far: ListPosition;
|
|
21
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/** The `featureList` prop with its defaults filled in, or `null` when the list is off. */
|
|
2
|
+
export function resolveFeatureList(value) {
|
|
3
|
+
if (value === false)
|
|
4
|
+
return null;
|
|
5
|
+
const options = value === true || value === undefined ? {} : value;
|
|
6
|
+
return { position: options.position ?? "top-left", reveal: options.reveal ?? "always" };
|
|
7
|
+
}
|
|
8
|
+
/** A corner's edges, and the other corner on the same side (where the panel must stop). */
|
|
9
|
+
export function cornerSides(position) {
|
|
10
|
+
const [vertical, horizontal] = position.split("-");
|
|
11
|
+
const far = `${vertical === "top" ? "bottom" : "top"}-${horizontal}`;
|
|
12
|
+
return { vertical, horizontal, far };
|
|
13
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,105 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
"name": "@sjvair/map-sdk",
|
|
3
|
+
"description": "Svelte 5 map components for SJVAir air-quality data",
|
|
4
|
+
"version": "0.1.0-beta.10",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/SJVAir/map-sdk"
|
|
9
|
+
},
|
|
10
|
+
"type": "module",
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=26"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"dev": "vite dev",
|
|
16
|
+
"build": "svelte-package -i src/lib -o dist",
|
|
17
|
+
"prepack": "npm run build",
|
|
18
|
+
"check": "svelte-check --tsconfig ./tsconfig.json",
|
|
19
|
+
"lint": "prettier --check . && eslint .",
|
|
20
|
+
"format": "prettier --write .",
|
|
21
|
+
"test": "vitest run",
|
|
22
|
+
"test:unit": "vitest run --project unit",
|
|
23
|
+
"test:client": "vitest run --project client",
|
|
24
|
+
"test:browser": "vitest run --project browser",
|
|
25
|
+
"test:bundle": "npm run build && node scripts/check-bundle.mjs",
|
|
26
|
+
"test:licenses": "npm run build && node scripts/check-licenses.mjs",
|
|
27
|
+
"test:e2e": "playwright test"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist"
|
|
31
|
+
],
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"**/*.css"
|
|
34
|
+
],
|
|
35
|
+
"svelte": "./dist/index.js",
|
|
36
|
+
"types": "./dist/index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"svelte": "./dist/index.js",
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"default": "./dist/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./stores": {
|
|
44
|
+
"svelte": "./dist/stores/index.js",
|
|
45
|
+
"types": "./dist/stores/index.d.ts",
|
|
46
|
+
"default": "./dist/stores/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./data": {
|
|
49
|
+
"svelte": "./dist/data/index.js",
|
|
50
|
+
"types": "./dist/data/index.d.ts",
|
|
51
|
+
"default": "./dist/data/index.js"
|
|
52
|
+
},
|
|
53
|
+
"./messages/en.json": {
|
|
54
|
+
"default": "./dist/data/messages/en.json"
|
|
55
|
+
},
|
|
56
|
+
"./theme.css": {
|
|
57
|
+
"default": "./dist/theme.css"
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@sjvair/sdk": "npm:@jsr/sjvair__sdk@^5.0.0-beta.2",
|
|
62
|
+
"svelte": "^5.57.0"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@maptiler/sdk": "~4.2.0",
|
|
66
|
+
"@turf/area": "^7.4.0",
|
|
67
|
+
"@turf/clusters-dbscan": "^7.4.0",
|
|
68
|
+
"@turf/helpers": "^7.4.0",
|
|
69
|
+
"@types/geojson": "^7946.0.16",
|
|
70
|
+
"color2k": "^2.0.4",
|
|
71
|
+
"esm-env": "^1.2.2"
|
|
72
|
+
},
|
|
73
|
+
"devDependencies": {
|
|
74
|
+
"@axe-core/playwright": "^4.14.0",
|
|
75
|
+
"@eslint/compat": "^2.1.1",
|
|
76
|
+
"@eslint/js": "^10.0.1",
|
|
77
|
+
"@maplibre/maplibre-gl-style-spec": "^24.10.0",
|
|
78
|
+
"@playwright/test": "^1.64.1",
|
|
79
|
+
"@sjvair/sdk": "npm:@jsr/sjvair__sdk@5.0.0-beta.3",
|
|
80
|
+
"@sveltejs/package": "^2.5.8",
|
|
81
|
+
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
82
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
83
|
+
"@types/node": "^26.6.0",
|
|
84
|
+
"@vitest/browser-playwright": "^5.0.5",
|
|
85
|
+
"axe-core": "^4.14.0",
|
|
86
|
+
"eslint": "^10.10.0",
|
|
87
|
+
"eslint-config-prettier": "^10.1.8",
|
|
88
|
+
"eslint-plugin-svelte": "^3.23.0",
|
|
89
|
+
"globals": "^17.12.0",
|
|
90
|
+
"prettier": "^3.9.6",
|
|
91
|
+
"prettier-plugin-svelte": "^4.1.1",
|
|
92
|
+
"prettier-plugin-tailwindcss": "^0.8.1",
|
|
93
|
+
"svelte": "^5.57.0",
|
|
94
|
+
"svelte-check": "^4.7.6",
|
|
95
|
+
"tailwindcss": "^4.3.3",
|
|
96
|
+
"typescript": "^6.0.3",
|
|
97
|
+
"typescript-eslint": "^8.70.0",
|
|
98
|
+
"vite": "^8.3.0",
|
|
99
|
+
"vitest": "^5.0.3",
|
|
100
|
+
"vitest-browser-svelte": "^3.1.0"
|
|
101
|
+
},
|
|
102
|
+
"keywords": [
|
|
103
|
+
"svelte"
|
|
104
|
+
]
|
|
105
|
+
}
|