@sjvair/map-sdk 0.0.0-stage → 0.1.0-beta.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.
Files changed (130) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +506 -2
  3. package/dist/core/basemap.svelte.d.ts +38 -0
  4. package/dist/core/basemap.svelte.js +163 -0
  5. package/dist/core/context.d.ts +5 -0
  6. package/dist/core/context.js +13 -0
  7. package/dist/core/create-map.svelte.d.ts +207 -0
  8. package/dist/core/create-map.svelte.js +376 -0
  9. package/dist/core/gl.d.ts +92 -0
  10. package/dist/core/gl.js +1 -0
  11. package/dist/core/interactions.svelte.d.ts +43 -0
  12. package/dist/core/interactions.svelte.js +230 -0
  13. package/dist/core/plugin-host.svelte.d.ts +46 -0
  14. package/dist/core/plugin-host.svelte.js +366 -0
  15. package/dist/core/plugin.d.ts +155 -0
  16. package/dist/core/plugin.js +1 -0
  17. package/dist/core/scoped-context.d.ts +7 -0
  18. package/dist/core/scoped-context.js +34 -0
  19. package/dist/data/format.d.ts +10 -0
  20. package/dist/data/format.js +24 -0
  21. package/dist/data/index.d.ts +9 -0
  22. package/dist/data/index.js +9 -0
  23. package/dist/data/messages/en.json +52 -0
  24. package/dist/data/messages.d.ts +10 -0
  25. package/dist/data/messages.js +17 -0
  26. package/dist/data/metadata.d.ts +22 -0
  27. package/dist/data/metadata.js +110 -0
  28. package/dist/data/refs.d.ts +18 -0
  29. package/dist/data/refs.js +61 -0
  30. package/dist/data/scale-types.d.ts +7 -0
  31. package/dist/data/scale-types.js +1 -0
  32. package/dist/data/scale.d.ts +13 -0
  33. package/dist/data/scale.js +27 -0
  34. package/dist/data/selection.d.ts +7 -0
  35. package/dist/data/selection.js +31 -0
  36. package/dist/data/static-source.d.ts +4 -0
  37. package/dist/data/static-source.js +3 -0
  38. package/dist/data/types.d.ts +69 -0
  39. package/dist/data/types.js +1 -0
  40. package/dist/index.d.ts +56 -0
  41. package/dist/index.js +41 -0
  42. package/dist/plugins/icons.d.ts +21 -0
  43. package/dist/plugins/icons.js +73 -0
  44. package/dist/plugins/points-clusters.d.ts +60 -0
  45. package/dist/plugins/points-clusters.js +93 -0
  46. package/dist/plugins/points.svelte.d.ts +100 -0
  47. package/dist/plugins/points.svelte.js +501 -0
  48. package/dist/plugins/scale-resolution.svelte.d.ts +27 -0
  49. package/dist/plugins/scale-resolution.svelte.js +111 -0
  50. package/dist/plugins/shapes.svelte.d.ts +29 -0
  51. package/dist/plugins/shapes.svelte.js +307 -0
  52. package/dist/plugins/shared.d.ts +6 -0
  53. package/dist/plugins/shared.js +18 -0
  54. package/dist/plugins/style.d.ts +57 -0
  55. package/dist/plugins/style.js +193 -0
  56. package/dist/presets/CollocationTooltip.svelte +132 -0
  57. package/dist/presets/CollocationTooltip.svelte.d.ts +16 -0
  58. package/dist/presets/MonitorClusterTooltip.svelte +149 -0
  59. package/dist/presets/MonitorClusterTooltip.svelte.d.ts +16 -0
  60. package/dist/presets/MonitorReadingBox.svelte +58 -0
  61. package/dist/presets/MonitorReadingBox.svelte.d.ts +12 -0
  62. package/dist/presets/MonitorTooltip.svelte +88 -0
  63. package/dist/presets/MonitorTooltip.svelte.d.ts +20 -0
  64. package/dist/presets/calheatscore.d.ts +24 -0
  65. package/dist/presets/calheatscore.js +22 -0
  66. package/dist/presets/collocation-sites.d.ts +18 -0
  67. package/dist/presets/collocation-sites.js +67 -0
  68. package/dist/presets/fire-groups.d.ts +26 -0
  69. package/dist/presets/fire-groups.js +51 -0
  70. package/dist/presets/forecast-zones.d.ts +25 -0
  71. package/dist/presets/forecast-zones.js +23 -0
  72. package/dist/presets/hms-fire.d.ts +26 -0
  73. package/dist/presets/hms-fire.js +87 -0
  74. package/dist/presets/hms-smoke.d.ts +19 -0
  75. package/dist/presets/hms-smoke.js +20 -0
  76. package/dist/presets/monitors.d.ts +48 -0
  77. package/dist/presets/monitors.js +243 -0
  78. package/dist/presets/reactive-props.svelte.d.ts +4 -0
  79. package/dist/presets/reactive-props.svelte.js +7 -0
  80. package/dist/presets/regions.d.ts +24 -0
  81. package/dist/presets/regions.js +22 -0
  82. package/dist/stores/abort.d.ts +16 -0
  83. package/dist/stores/abort.js +52 -0
  84. package/dist/stores/collocation-store.svelte.d.ts +25 -0
  85. package/dist/stores/collocation-store.svelte.js +72 -0
  86. package/dist/stores/hms-stores.svelte.d.ts +35 -0
  87. package/dist/stores/hms-stores.svelte.js +97 -0
  88. package/dist/stores/index.d.ts +4 -0
  89. package/dist/stores/index.js +4 -0
  90. package/dist/stores/load-once.svelte.d.ts +25 -0
  91. package/dist/stores/load-once.svelte.js +93 -0
  92. package/dist/stores/monitors-store.svelte.d.ts +85 -0
  93. package/dist/stores/monitors-store.svelte.js +340 -0
  94. package/dist/theme.css +34 -0
  95. package/dist/ui/FeatureList.svelte +505 -0
  96. package/dist/ui/FeatureList.svelte.d.ts +14 -0
  97. package/dist/ui/Legend.svelte +213 -0
  98. package/dist/ui/Legend.svelte.d.ts +22 -0
  99. package/dist/ui/LegendBar.svelte +161 -0
  100. package/dist/ui/LegendBar.svelte.d.ts +11 -0
  101. package/dist/ui/MapControls.svelte +135 -0
  102. package/dist/ui/MapControls.svelte.d.ts +11 -0
  103. package/dist/ui/MapTooltip.svelte +158 -0
  104. package/dist/ui/MapTooltip.svelte.d.ts +28 -0
  105. package/dist/ui/SelectionBar.svelte +123 -0
  106. package/dist/ui/SelectionBar.svelte.d.ts +10 -0
  107. package/dist/ui/TooltipItem.svelte +72 -0
  108. package/dist/ui/TooltipItem.svelte.d.ts +11 -0
  109. package/dist/ui/ViewSummary.svelte +97 -0
  110. package/dist/ui/ViewSummary.svelte.d.ts +7 -0
  111. package/dist/ui/controls.css +45 -0
  112. package/dist/ui/data-credits.svelte.d.ts +9 -0
  113. package/dist/ui/data-credits.svelte.js +52 -0
  114. package/dist/ui/feature-list.d.ts +38 -0
  115. package/dist/ui/feature-list.js +95 -0
  116. package/dist/ui/legend-data.d.ts +41 -0
  117. package/dist/ui/legend-data.js +40 -0
  118. package/dist/ui/level-chip.d.ts +11 -0
  119. package/dist/ui/level-chip.js +15 -0
  120. package/dist/ui/value-format.d.ts +7 -0
  121. package/dist/ui/value-format.js +13 -0
  122. package/dist/ui/view-summary.d.ts +11 -0
  123. package/dist/ui/view-summary.js +33 -0
  124. package/dist/view/MapView.svelte +373 -0
  125. package/dist/view/MapView.svelte.d.ts +43 -0
  126. package/dist/view/create-gl-map.d.ts +34 -0
  127. package/dist/view/create-gl-map.js +182 -0
  128. package/dist/view/list-placement.d.ts +21 -0
  129. package/dist/view/list-placement.js +13 -0
  130. package/package.json +103 -5
@@ -0,0 +1,43 @@
1
+ import "@maptiler/sdk/dist/maptiler-sdk.css";
2
+ import "../ui/controls.css";
3
+ import type { Snippet } from "svelte";
4
+ import type { MapContext } from "../core/create-map.svelte.js";
5
+ import { type FeatureListOptions } from "./list-placement.js";
6
+ interface Props {
7
+ /** The map to show. Fixed for the component's life. */
8
+ map: MapContext;
9
+ /** `false` releases the WebGL context; `true` rebuilds it with the same camera. */
10
+ active?: boolean;
11
+ class?: string;
12
+ /** The region's accessible name. Defaults to the `mapsdk_map_label` message. */
13
+ label?: string;
14
+ /** On-screen pieces drawn over the map; they get the map through `getMapContext()`. */
15
+ overlays?: Snippet;
16
+ /**
17
+ * The List button and its feature list panel: `false` leaves them out; `true` (default) or
18
+ * options place them. `position` picks the corner (default `"top-left"`); the button stacks
19
+ * below (or, in a bottom corner, above) the controls in that corner, and the open panel stops
20
+ * short of the controls and credits at the far end of its side. `reveal: "focus"` shows the
21
+ * button only while it or its open panel has keyboard focus (and the whole time the panel is
22
+ * open); otherwise it's visually hidden but stays in the Tab order, like a skip link.
23
+ */
24
+ featureList?: boolean | FeatureListOptions;
25
+ /** `false` leaves out the selection bar. */
26
+ selectionBar?: boolean;
27
+ /**
28
+ * The zoom controls: `"mapsdk"` (default) draws map-sdk's zoom buttons, `"engine"` the
29
+ * MapTiler SDK's default zoom/compass and locate-me controls, `"none"` none. The credits
30
+ * always show. Choose it up front: changing it after mount recreates the map (the engine
31
+ * controls are part of how the map is built), like `active`.
32
+ */
33
+ controls?: "mapsdk" | "engine" | "none";
34
+ /**
35
+ * `"pinned"` (default) anchors the tooltip to its feature. `"pointer"` shows it at the
36
+ * pointer, like sjvair.com's map, and hides it on zoom until the pointer moves again.
37
+ * Keyboard focus from the feature list always shows it pinned.
38
+ */
39
+ tooltip?: "pinned" | "pointer";
40
+ }
41
+ declare const MapView: import("svelte").Component<Props, {}, "">;
42
+ type MapView = ReturnType<typeof MapView>;
43
+ export default MapView;
@@ -0,0 +1,34 @@
1
+ import type { BasemapConfig } from "../core/basemap.svelte.js";
2
+ import type { MapContext } from "../core/create-map.svelte.js";
3
+ import type { GlMapLike } from "../core/gl.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 declare function watchTheme(container: Element, onChange: () => void): () => void;
11
+ /** Today's live map: MapTiler Streets v4 and its variants, without the busy POI label layers. */
12
+ export declare function defaultBasemaps(): BasemapConfig;
13
+ /**
14
+ * A `transformRequest` that adds `key` to MapTiler API requests that have none. The SDK's own
15
+ * transform runs after it and only adds its global `config.apiKey` when `key` is missing, so
16
+ * each map's requests carry its own key, and two maps with different keys don't clash.
17
+ */
18
+ export declare function maptilerKeyTransform(key: string): (url: string) => {
19
+ url: string;
20
+ };
21
+ /**
22
+ * Creates the MapTiler map for `ctx` in `container`, at `ctx`'s camera with its current basemap.
23
+ * Reads `ctx` untracked, so calling this in an effect doesn't make it depend on the camera or
24
+ * basemap. With `engineControls`, the MapTiler SDK adds its default zoom/compass and locate-me
25
+ * controls at the top right; they go with the map.
26
+ * Records the camera and bounds once the map loads and after every move.
27
+ */
28
+ export declare function createGlMap(container: HTMLElement, ctx: MapContext, engineControls?: boolean): GlMapLike;
29
+ /**
30
+ * Shows `credits` (plain text, one per dataset) in the map's attribution control, after the
31
+ * style's own credits. The control is replaced, not edited: MapLibre reads its custom
32
+ * attribution once. Does nothing for a map that isn't one of `createGlMap`'s or has no change.
33
+ */
34
+ export declare function setDataCredits(gl: GlMapLike, credits: string[]): void;
@@ -0,0 +1,182 @@
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
+ const gl = new GlMap({
132
+ container,
133
+ style,
134
+ center: camera.center,
135
+ zoom: camera.zoom,
136
+ bearing: camera.bearing,
137
+ pitch: camera.pitch,
138
+ // The key goes on each request, not on the SDK's global config (the `apiKey` option
139
+ // sets that global).
140
+ transformRequest: maptilerKeyTransform(ctx.config.maptilerKey),
141
+ cooperativeGestures: ctx.config.cooperativeGestures ?? false,
142
+ keyboard: true,
143
+ // The engine's attribution control (and MapTiler's logo, when the key's plan requires it),
144
+ // at its automatic size: full on wide maps, collapsed on narrow ones. The SDK's default is
145
+ // always full, so ask for its automatic mode.
146
+ attributionControl: { compact: "auto" },
147
+ // `controls: "engine"` gets the SDK's own zoom/compass and locate-me controls, with its
148
+ // defaults (as monitor-map has today); otherwise MapView draws the controls.
149
+ navigationControl: engineControls ? "top-right" : false,
150
+ geolocateControl: engineControls ? "top-right" : false,
151
+ logSDKVersion: false,
152
+ // Only when set, so a map without them gets today's constructor options.
153
+ ...(ctx.config.projection ? { projection: ctx.config.projection } : {}),
154
+ ...(ctx.config.space ? { space: ctx.config.space } : {})
155
+ });
156
+ gl.on("load", () => recordView(gl, ctx));
157
+ gl.on("moveend", () => recordView(gl, ctx));
158
+ return gl;
159
+ }
160
+ const escapeHtml = (text) => text.replace(/[&<>"']/g, (c) => `&#${c.charCodeAt(0)};`);
161
+ /**
162
+ * Shows `credits` (plain text, one per dataset) in the map's attribution control, after the
163
+ * style's own credits. The control is replaced, not edited: MapLibre reads its custom
164
+ * attribution once. Does nothing for a map that isn't one of `createGlMap`'s or has no change.
165
+ */
166
+ export function setDataCredits(gl, credits) {
167
+ const map = gl;
168
+ const current = map.attribution;
169
+ if (!current || !(map instanceof GlMap))
170
+ return;
171
+ const key = JSON.stringify(credits);
172
+ if (key === current.credits)
173
+ return;
174
+ map.removeControl(current.control);
175
+ map.attribution = null;
176
+ const next = new AttributionControl({
177
+ compact: undefined,
178
+ customAttribution: credits.map(escapeHtml)
179
+ });
180
+ map.addControl(next);
181
+ map.attribution = { control: next, credits: key };
182
+ }
@@ -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,104 @@
1
1
  {
2
- "name": "@sjvair/map-sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
2
+ "name": "@sjvair/map-sdk",
3
+ "description": "Svelte 5 map components for SJVAir air-quality data",
4
+ "version": "0.1.0-beta.2",
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/clusters-dbscan": "^7.4.0",
67
+ "@turf/helpers": "^7.4.0",
68
+ "@types/geojson": "^7946.0.16",
69
+ "color2k": "^2.0.4",
70
+ "esm-env": "^1.2.2"
71
+ },
72
+ "devDependencies": {
73
+ "@axe-core/playwright": "^4.14.0",
74
+ "@eslint/compat": "^2.1.1",
75
+ "@eslint/js": "^10.0.1",
76
+ "@maplibre/maplibre-gl-style-spec": "^24.10.0",
77
+ "@playwright/test": "^1.64.1",
78
+ "@sjvair/sdk": "npm:@jsr/sjvair__sdk@5.0.0-beta.3",
79
+ "@sveltejs/package": "^2.5.8",
80
+ "@sveltejs/vite-plugin-svelte": "^7.3.0",
81
+ "@tailwindcss/vite": "^4.3.3",
82
+ "@types/node": "^26.6.0",
83
+ "@vitest/browser-playwright": "^5.0.5",
84
+ "axe-core": "^4.14.0",
85
+ "eslint": "^10.10.0",
86
+ "eslint-config-prettier": "^10.1.8",
87
+ "eslint-plugin-svelte": "^3.23.0",
88
+ "globals": "^17.12.0",
89
+ "prettier": "^3.9.6",
90
+ "prettier-plugin-svelte": "^4.1.1",
91
+ "prettier-plugin-tailwindcss": "^0.8.1",
92
+ "svelte": "^5.57.0",
93
+ "svelte-check": "^4.7.6",
94
+ "tailwindcss": "^4.3.3",
95
+ "typescript": "^6.0.3",
96
+ "typescript-eslint": "^8.70.0",
97
+ "vite": "^8.3.0",
98
+ "vitest": "^5.0.3",
99
+ "vitest-browser-svelte": "^3.1.0"
100
+ },
101
+ "keywords": [
102
+ "svelte"
103
+ ]
104
+ }