@page-speed/maps 0.1.0
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 +54 -0
- package/dist/core/MapLibre.cjs +383 -0
- package/dist/core/MapLibre.cjs.map +1 -0
- package/dist/core/MapLibre.d.cts +8 -0
- package/dist/core/MapLibre.d.ts +8 -0
- package/dist/core/MapLibre.js +376 -0
- package/dist/core/MapLibre.js.map +1 -0
- package/dist/core/index.cjs +383 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +4 -0
- package/dist/core/index.d.ts +4 -0
- package/dist/core/index.js +376 -0
- package/dist/core/index.js.map +1 -0
- package/dist/index.cjs +395 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +384 -0
- package/dist/index.js.map +1 -0
- package/dist/types/index.cjs +4 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.cts +67 -0
- package/dist/types/index.d.ts +67 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/getMapLibreStyleUrl.cjs +62 -0
- package/dist/utils/getMapLibreStyleUrl.cjs.map +1 -0
- package/dist/utils/getMapLibreStyleUrl.d.cts +8 -0
- package/dist/utils/getMapLibreStyleUrl.d.ts +8 -0
- package/dist/utils/getMapLibreStyleUrl.js +57 -0
- package/dist/utils/getMapLibreStyleUrl.js.map +1 -0
- package/dist/utils/googleMapLinks.cjs +14 -0
- package/dist/utils/googleMapLinks.cjs.map +1 -0
- package/dist/utils/googleMapLinks.d.cts +4 -0
- package/dist/utils/googleMapLinks.d.ts +4 -0
- package/dist/utils/googleMapLinks.js +11 -0
- package/dist/utils/googleMapLinks.js.map +1 -0
- package/dist/utils/index.cjs +72 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +65 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +112 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const MAPLIBRE_DEFAULT_STYLE_URL = "https://demotiles.maplibre.org/style.json";
|
|
2
|
+
declare const DEFAULT_STADIA_STYLE_URL = "https://tiles.stadiamaps.com/styles/osm_bright.json";
|
|
3
|
+
declare const STYLE_MAP: Record<string, string>;
|
|
4
|
+
type MapLibreBuiltInStyle = keyof typeof STYLE_MAP;
|
|
5
|
+
declare function appendStadiaApiKey(styleUrl: string, stadiaApiKey: string): string;
|
|
6
|
+
declare function getMapLibreStyleUrl(value: string | undefined, stadiaApiKey: string): string;
|
|
7
|
+
|
|
8
|
+
export { DEFAULT_STADIA_STYLE_URL, MAPLIBRE_DEFAULT_STYLE_URL, type MapLibreBuiltInStyle, appendStadiaApiKey, getMapLibreStyleUrl };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// src/utils/getMapLibreStyleUrl.ts
|
|
2
|
+
var MAPLIBRE_DEFAULT_STYLE_URL = "https://demotiles.maplibre.org/style.json";
|
|
3
|
+
var DEFAULT_STADIA_STYLE_URL = "https://tiles.stadiamaps.com/styles/osm_bright.json";
|
|
4
|
+
var STYLE_MAP = {
|
|
5
|
+
default: DEFAULT_STADIA_STYLE_URL,
|
|
6
|
+
"alidade-smooth": "https://tiles.stadiamaps.com/styles/alidade_smooth.json",
|
|
7
|
+
"alidade-smooth-dark": "https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json",
|
|
8
|
+
"maplibre-default": MAPLIBRE_DEFAULT_STYLE_URL,
|
|
9
|
+
"osm-bright": "https://tiles.stadiamaps.com/styles/osm_bright.json",
|
|
10
|
+
"stadia-outdoors": "https://tiles.stadiamaps.com/styles/outdoors.json",
|
|
11
|
+
"stamen-toner": "https://tiles.stadiamaps.com/styles/stamen_toner.json",
|
|
12
|
+
"stamen-terrain": "https://tiles.stadiamaps.com/styles/stamen_terrain.json",
|
|
13
|
+
"stamen-watercolor": "https://tiles.stadiamaps.com/styles/stamen_watercolor.json"
|
|
14
|
+
};
|
|
15
|
+
var HTTP_URL_REGEX = /^https?:\/\//i;
|
|
16
|
+
function isStadiaMapsUrl(url) {
|
|
17
|
+
try {
|
|
18
|
+
const parsed = new URL(url);
|
|
19
|
+
return parsed.hostname === "tiles.stadiamaps.com";
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function assertStadiaApiKey(stadiaApiKey) {
|
|
25
|
+
if (!stadiaApiKey.trim()) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
"A non-empty stadiaApiKey is required for Stadia Maps style URLs."
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function appendStadiaApiKey(styleUrl, stadiaApiKey) {
|
|
32
|
+
if (!isStadiaMapsUrl(styleUrl)) {
|
|
33
|
+
return styleUrl;
|
|
34
|
+
}
|
|
35
|
+
assertStadiaApiKey(stadiaApiKey);
|
|
36
|
+
const parsed = new URL(styleUrl);
|
|
37
|
+
if (!parsed.searchParams.has("api_key")) {
|
|
38
|
+
parsed.searchParams.set("api_key", stadiaApiKey);
|
|
39
|
+
}
|
|
40
|
+
return parsed.toString();
|
|
41
|
+
}
|
|
42
|
+
function getMapLibreStyleUrl(value, stadiaApiKey) {
|
|
43
|
+
if (!value || typeof value !== "string") {
|
|
44
|
+
return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);
|
|
45
|
+
}
|
|
46
|
+
if (STYLE_MAP[value]) {
|
|
47
|
+
return appendStadiaApiKey(STYLE_MAP[value], stadiaApiKey);
|
|
48
|
+
}
|
|
49
|
+
if (HTTP_URL_REGEX.test(value)) {
|
|
50
|
+
return appendStadiaApiKey(value, stadiaApiKey);
|
|
51
|
+
}
|
|
52
|
+
return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export { DEFAULT_STADIA_STYLE_URL, MAPLIBRE_DEFAULT_STYLE_URL, appendStadiaApiKey, getMapLibreStyleUrl };
|
|
56
|
+
//# sourceMappingURL=getMapLibreStyleUrl.js.map
|
|
57
|
+
//# sourceMappingURL=getMapLibreStyleUrl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/getMapLibreStyleUrl.ts"],"names":[],"mappings":";AAAA,IAAM,0BAAA,GAA6B;AACnC,IAAM,wBAAA,GACJ;AAEF,IAAM,SAAA,GAAoC;AAAA,EACxC,OAAA,EAAS,wBAAA;AAAA,EACT,gBAAA,EAAkB,yDAAA;AAAA,EAClB,qBAAA,EAAuB,8DAAA;AAAA,EACvB,kBAAA,EAAoB,0BAAA;AAAA,EACpB,YAAA,EAAc,qDAAA;AAAA,EACd,iBAAA,EAAmB,mDAAA;AAAA,EACnB,cAAA,EAAgB,uDAAA;AAAA,EAChB,gBAAA,EAAkB,yDAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB,CAAA;AAEA,IAAM,cAAA,GAAiB,eAAA;AAIvB,SAAS,gBAAgB,GAAA,EAAsB;AAC7C,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,GAAG,CAAA;AAC1B,IAAA,OAAO,OAAO,QAAA,KAAa,sBAAA;AAAA,EAC7B,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAEA,SAAS,mBAAmB,YAAA,EAA4B;AACtD,EAAA,IAAI,CAAC,YAAA,CAAa,IAAA,EAAK,EAAG;AACxB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AAAA,EACF;AACF;AAEO,SAAS,kBAAA,CACd,UACA,YAAA,EACQ;AACR,EAAA,IAAI,CAAC,eAAA,CAAgB,QAAQ,CAAA,EAAG;AAC9B,IAAA,OAAO,QAAA;AAAA,EACT;AAEA,EAAA,kBAAA,CAAmB,YAAY,CAAA;AAE/B,EAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,QAAQ,CAAA;AAC/B,EAAA,IAAI,CAAC,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAS,CAAA,EAAG;AACvC,IAAA,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAA,EAAW,YAAY,CAAA;AAAA,EACjD;AAEA,EAAA,OAAO,OAAO,QAAA,EAAS;AACzB;AAEO,SAAS,mBAAA,CACd,OACA,YAAA,EACQ;AACR,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,EAAU;AACvC,IAAA,OAAO,kBAAA,CAAmB,0BAA0B,YAAY,CAAA;AAAA,EAClE;AAEA,EAAA,IAAI,SAAA,CAAU,KAAK,CAAA,EAAG;AACpB,IAAA,OAAO,kBAAA,CAAmB,SAAA,CAAU,KAAK,CAAA,EAAG,YAAY,CAAA;AAAA,EAC1D;AAEA,EAAA,IAAI,cAAA,CAAe,IAAA,CAAK,KAAK,CAAA,EAAG;AAC9B,IAAA,OAAO,kBAAA,CAAmB,OAAO,YAAY,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,kBAAA,CAAmB,0BAA0B,YAAY,CAAA;AAClE","file":"getMapLibreStyleUrl.js","sourcesContent":["const MAPLIBRE_DEFAULT_STYLE_URL = \"https://demotiles.maplibre.org/style.json\";\nconst DEFAULT_STADIA_STYLE_URL =\n \"https://tiles.stadiamaps.com/styles/osm_bright.json\";\n\nconst STYLE_MAP: Record<string, string> = {\n default: DEFAULT_STADIA_STYLE_URL,\n \"alidade-smooth\": \"https://tiles.stadiamaps.com/styles/alidade_smooth.json\",\n \"alidade-smooth-dark\": \"https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json\",\n \"maplibre-default\": MAPLIBRE_DEFAULT_STYLE_URL,\n \"osm-bright\": \"https://tiles.stadiamaps.com/styles/osm_bright.json\",\n \"stadia-outdoors\": \"https://tiles.stadiamaps.com/styles/outdoors.json\",\n \"stamen-toner\": \"https://tiles.stadiamaps.com/styles/stamen_toner.json\",\n \"stamen-terrain\": \"https://tiles.stadiamaps.com/styles/stamen_terrain.json\",\n \"stamen-watercolor\": \"https://tiles.stadiamaps.com/styles/stamen_watercolor.json\"\n};\n\nconst HTTP_URL_REGEX = /^https?:\\/\\//i;\n\nexport type MapLibreBuiltInStyle = keyof typeof STYLE_MAP;\n\nfunction isStadiaMapsUrl(url: string): boolean {\n try {\n const parsed = new URL(url);\n return parsed.hostname === \"tiles.stadiamaps.com\";\n } catch {\n return false;\n }\n}\n\nfunction assertStadiaApiKey(stadiaApiKey: string): void {\n if (!stadiaApiKey.trim()) {\n throw new Error(\n \"A non-empty stadiaApiKey is required for Stadia Maps style URLs.\"\n );\n }\n}\n\nexport function appendStadiaApiKey(\n styleUrl: string,\n stadiaApiKey: string\n): string {\n if (!isStadiaMapsUrl(styleUrl)) {\n return styleUrl;\n }\n\n assertStadiaApiKey(stadiaApiKey);\n\n const parsed = new URL(styleUrl);\n if (!parsed.searchParams.has(\"api_key\")) {\n parsed.searchParams.set(\"api_key\", stadiaApiKey);\n }\n\n return parsed.toString();\n}\n\nexport function getMapLibreStyleUrl(\n value: string | undefined,\n stadiaApiKey: string\n): string {\n if (!value || typeof value !== \"string\") {\n return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);\n }\n\n if (STYLE_MAP[value]) {\n return appendStadiaApiKey(STYLE_MAP[value], stadiaApiKey);\n }\n\n if (HTTP_URL_REGEX.test(value)) {\n return appendStadiaApiKey(value, stadiaApiKey);\n }\n\n return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);\n}\n\nexport { DEFAULT_STADIA_STYLE_URL, MAPLIBRE_DEFAULT_STYLE_URL };\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/utils/googleMapLinks.ts
|
|
4
|
+
function generateGoogleMapLink(latitude, longitude, zoom = 15) {
|
|
5
|
+
return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;
|
|
6
|
+
}
|
|
7
|
+
function generateGoogleDirectionsLink(latitude, longitude) {
|
|
8
|
+
return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
exports.generateGoogleDirectionsLink = generateGoogleDirectionsLink;
|
|
12
|
+
exports.generateGoogleMapLink = generateGoogleMapLink;
|
|
13
|
+
//# sourceMappingURL=googleMapLinks.cjs.map
|
|
14
|
+
//# sourceMappingURL=googleMapLinks.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/googleMapLinks.ts"],"names":[],"mappings":";;;AAAO,SAAS,qBAAA,CACd,QAAA,EACA,SAAA,EACA,IAAA,GAAO,EAAA,EACC;AACR,EAAA,OAAO,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA,CAAA;AACtE;AAEO,SAAS,4BAAA,CACd,UACA,SAAA,EACQ;AACR,EAAA,OAAO,CAAA,mDAAA,EAAsD,QAAQ,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA;AACpF","file":"googleMapLinks.cjs","sourcesContent":["export function generateGoogleMapLink(\n latitude: number,\n longitude: number,\n zoom = 15\n): string {\n return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;\n}\n\nexport function generateGoogleDirectionsLink(\n latitude: number,\n longitude: number\n): string {\n return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// src/utils/googleMapLinks.ts
|
|
2
|
+
function generateGoogleMapLink(latitude, longitude, zoom = 15) {
|
|
3
|
+
return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;
|
|
4
|
+
}
|
|
5
|
+
function generateGoogleDirectionsLink(latitude, longitude) {
|
|
6
|
+
return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export { generateGoogleDirectionsLink, generateGoogleMapLink };
|
|
10
|
+
//# sourceMappingURL=googleMapLinks.js.map
|
|
11
|
+
//# sourceMappingURL=googleMapLinks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/googleMapLinks.ts"],"names":[],"mappings":";AAAO,SAAS,qBAAA,CACd,QAAA,EACA,SAAA,EACA,IAAA,GAAO,EAAA,EACC;AACR,EAAA,OAAO,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA,CAAA;AACtE;AAEO,SAAS,4BAAA,CACd,UACA,SAAA,EACQ;AACR,EAAA,OAAO,CAAA,mDAAA,EAAsD,QAAQ,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA;AACpF","file":"googleMapLinks.js","sourcesContent":["export function generateGoogleMapLink(\n latitude: number,\n longitude: number,\n zoom = 15\n): string {\n return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;\n}\n\nexport function generateGoogleDirectionsLink(\n latitude: number,\n longitude: number\n): string {\n return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;\n}\n"]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/utils/getMapLibreStyleUrl.ts
|
|
4
|
+
var MAPLIBRE_DEFAULT_STYLE_URL = "https://demotiles.maplibre.org/style.json";
|
|
5
|
+
var DEFAULT_STADIA_STYLE_URL = "https://tiles.stadiamaps.com/styles/osm_bright.json";
|
|
6
|
+
var STYLE_MAP = {
|
|
7
|
+
default: DEFAULT_STADIA_STYLE_URL,
|
|
8
|
+
"alidade-smooth": "https://tiles.stadiamaps.com/styles/alidade_smooth.json",
|
|
9
|
+
"alidade-smooth-dark": "https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json",
|
|
10
|
+
"maplibre-default": MAPLIBRE_DEFAULT_STYLE_URL,
|
|
11
|
+
"osm-bright": "https://tiles.stadiamaps.com/styles/osm_bright.json",
|
|
12
|
+
"stadia-outdoors": "https://tiles.stadiamaps.com/styles/outdoors.json",
|
|
13
|
+
"stamen-toner": "https://tiles.stadiamaps.com/styles/stamen_toner.json",
|
|
14
|
+
"stamen-terrain": "https://tiles.stadiamaps.com/styles/stamen_terrain.json",
|
|
15
|
+
"stamen-watercolor": "https://tiles.stadiamaps.com/styles/stamen_watercolor.json"
|
|
16
|
+
};
|
|
17
|
+
var HTTP_URL_REGEX = /^https?:\/\//i;
|
|
18
|
+
function isStadiaMapsUrl(url) {
|
|
19
|
+
try {
|
|
20
|
+
const parsed = new URL(url);
|
|
21
|
+
return parsed.hostname === "tiles.stadiamaps.com";
|
|
22
|
+
} catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function assertStadiaApiKey(stadiaApiKey) {
|
|
27
|
+
if (!stadiaApiKey.trim()) {
|
|
28
|
+
throw new Error(
|
|
29
|
+
"A non-empty stadiaApiKey is required for Stadia Maps style URLs."
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function appendStadiaApiKey(styleUrl, stadiaApiKey) {
|
|
34
|
+
if (!isStadiaMapsUrl(styleUrl)) {
|
|
35
|
+
return styleUrl;
|
|
36
|
+
}
|
|
37
|
+
assertStadiaApiKey(stadiaApiKey);
|
|
38
|
+
const parsed = new URL(styleUrl);
|
|
39
|
+
if (!parsed.searchParams.has("api_key")) {
|
|
40
|
+
parsed.searchParams.set("api_key", stadiaApiKey);
|
|
41
|
+
}
|
|
42
|
+
return parsed.toString();
|
|
43
|
+
}
|
|
44
|
+
function getMapLibreStyleUrl(value, stadiaApiKey) {
|
|
45
|
+
if (!value || typeof value !== "string") {
|
|
46
|
+
return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);
|
|
47
|
+
}
|
|
48
|
+
if (STYLE_MAP[value]) {
|
|
49
|
+
return appendStadiaApiKey(STYLE_MAP[value], stadiaApiKey);
|
|
50
|
+
}
|
|
51
|
+
if (HTTP_URL_REGEX.test(value)) {
|
|
52
|
+
return appendStadiaApiKey(value, stadiaApiKey);
|
|
53
|
+
}
|
|
54
|
+
return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// src/utils/googleMapLinks.ts
|
|
58
|
+
function generateGoogleMapLink(latitude, longitude, zoom = 15) {
|
|
59
|
+
return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;
|
|
60
|
+
}
|
|
61
|
+
function generateGoogleDirectionsLink(latitude, longitude) {
|
|
62
|
+
return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
exports.DEFAULT_STADIA_STYLE_URL = DEFAULT_STADIA_STYLE_URL;
|
|
66
|
+
exports.MAPLIBRE_DEFAULT_STYLE_URL = MAPLIBRE_DEFAULT_STYLE_URL;
|
|
67
|
+
exports.appendStadiaApiKey = appendStadiaApiKey;
|
|
68
|
+
exports.generateGoogleDirectionsLink = generateGoogleDirectionsLink;
|
|
69
|
+
exports.generateGoogleMapLink = generateGoogleMapLink;
|
|
70
|
+
exports.getMapLibreStyleUrl = getMapLibreStyleUrl;
|
|
71
|
+
//# sourceMappingURL=index.cjs.map
|
|
72
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/getMapLibreStyleUrl.ts","../../src/utils/googleMapLinks.ts"],"names":[],"mappings":";;;AAAA,IAAM,0BAAA,GAA6B;AACnC,IAAM,wBAAA,GACJ;AAEF,IAAM,SAAA,GAAoC;AAAA,EACxC,OAAA,EAAS,wBAAA;AAAA,EACT,gBAAA,EAAkB,yDAAA;AAAA,EAClB,qBAAA,EAAuB,8DAAA;AAAA,EACvB,kBAAA,EAAoB,0BAAA;AAAA,EACpB,YAAA,EAAc,qDAAA;AAAA,EACd,iBAAA,EAAmB,mDAAA;AAAA,EACnB,cAAA,EAAgB,uDAAA;AAAA,EAChB,gBAAA,EAAkB,yDAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB,CAAA;AAEA,IAAM,cAAA,GAAiB,eAAA;AAIvB,SAAS,gBAAgB,GAAA,EAAsB;AAC7C,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,GAAG,CAAA;AAC1B,IAAA,OAAO,OAAO,QAAA,KAAa,sBAAA;AAAA,EAC7B,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAEA,SAAS,mBAAmB,YAAA,EAA4B;AACtD,EAAA,IAAI,CAAC,YAAA,CAAa,IAAA,EAAK,EAAG;AACxB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AAAA,EACF;AACF;AAEO,SAAS,kBAAA,CACd,UACA,YAAA,EACQ;AACR,EAAA,IAAI,CAAC,eAAA,CAAgB,QAAQ,CAAA,EAAG;AAC9B,IAAA,OAAO,QAAA;AAAA,EACT;AAEA,EAAA,kBAAA,CAAmB,YAAY,CAAA;AAE/B,EAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,QAAQ,CAAA;AAC/B,EAAA,IAAI,CAAC,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAS,CAAA,EAAG;AACvC,IAAA,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAA,EAAW,YAAY,CAAA;AAAA,EACjD;AAEA,EAAA,OAAO,OAAO,QAAA,EAAS;AACzB;AAEO,SAAS,mBAAA,CACd,OACA,YAAA,EACQ;AACR,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,EAAU;AACvC,IAAA,OAAO,kBAAA,CAAmB,0BAA0B,YAAY,CAAA;AAAA,EAClE;AAEA,EAAA,IAAI,SAAA,CAAU,KAAK,CAAA,EAAG;AACpB,IAAA,OAAO,kBAAA,CAAmB,SAAA,CAAU,KAAK,CAAA,EAAG,YAAY,CAAA;AAAA,EAC1D;AAEA,EAAA,IAAI,cAAA,CAAe,IAAA,CAAK,KAAK,CAAA,EAAG;AAC9B,IAAA,OAAO,kBAAA,CAAmB,OAAO,YAAY,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,kBAAA,CAAmB,0BAA0B,YAAY,CAAA;AAClE;;;ACxEO,SAAS,qBAAA,CACd,QAAA,EACA,SAAA,EACA,IAAA,GAAO,EAAA,EACC;AACR,EAAA,OAAO,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA,CAAA;AACtE;AAEO,SAAS,4BAAA,CACd,UACA,SAAA,EACQ;AACR,EAAA,OAAO,CAAA,mDAAA,EAAsD,QAAQ,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA;AACpF","file":"index.cjs","sourcesContent":["const MAPLIBRE_DEFAULT_STYLE_URL = \"https://demotiles.maplibre.org/style.json\";\nconst DEFAULT_STADIA_STYLE_URL =\n \"https://tiles.stadiamaps.com/styles/osm_bright.json\";\n\nconst STYLE_MAP: Record<string, string> = {\n default: DEFAULT_STADIA_STYLE_URL,\n \"alidade-smooth\": \"https://tiles.stadiamaps.com/styles/alidade_smooth.json\",\n \"alidade-smooth-dark\": \"https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json\",\n \"maplibre-default\": MAPLIBRE_DEFAULT_STYLE_URL,\n \"osm-bright\": \"https://tiles.stadiamaps.com/styles/osm_bright.json\",\n \"stadia-outdoors\": \"https://tiles.stadiamaps.com/styles/outdoors.json\",\n \"stamen-toner\": \"https://tiles.stadiamaps.com/styles/stamen_toner.json\",\n \"stamen-terrain\": \"https://tiles.stadiamaps.com/styles/stamen_terrain.json\",\n \"stamen-watercolor\": \"https://tiles.stadiamaps.com/styles/stamen_watercolor.json\"\n};\n\nconst HTTP_URL_REGEX = /^https?:\\/\\//i;\n\nexport type MapLibreBuiltInStyle = keyof typeof STYLE_MAP;\n\nfunction isStadiaMapsUrl(url: string): boolean {\n try {\n const parsed = new URL(url);\n return parsed.hostname === \"tiles.stadiamaps.com\";\n } catch {\n return false;\n }\n}\n\nfunction assertStadiaApiKey(stadiaApiKey: string): void {\n if (!stadiaApiKey.trim()) {\n throw new Error(\n \"A non-empty stadiaApiKey is required for Stadia Maps style URLs.\"\n );\n }\n}\n\nexport function appendStadiaApiKey(\n styleUrl: string,\n stadiaApiKey: string\n): string {\n if (!isStadiaMapsUrl(styleUrl)) {\n return styleUrl;\n }\n\n assertStadiaApiKey(stadiaApiKey);\n\n const parsed = new URL(styleUrl);\n if (!parsed.searchParams.has(\"api_key\")) {\n parsed.searchParams.set(\"api_key\", stadiaApiKey);\n }\n\n return parsed.toString();\n}\n\nexport function getMapLibreStyleUrl(\n value: string | undefined,\n stadiaApiKey: string\n): string {\n if (!value || typeof value !== \"string\") {\n return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);\n }\n\n if (STYLE_MAP[value]) {\n return appendStadiaApiKey(STYLE_MAP[value], stadiaApiKey);\n }\n\n if (HTTP_URL_REGEX.test(value)) {\n return appendStadiaApiKey(value, stadiaApiKey);\n }\n\n return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);\n}\n\nexport { DEFAULT_STADIA_STYLE_URL, MAPLIBRE_DEFAULT_STYLE_URL };\n","export function generateGoogleMapLink(\n latitude: number,\n longitude: number,\n zoom = 15\n): string {\n return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;\n}\n\nexport function generateGoogleDirectionsLink(\n latitude: number,\n longitude: number\n): string {\n return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;\n}\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// src/utils/getMapLibreStyleUrl.ts
|
|
2
|
+
var MAPLIBRE_DEFAULT_STYLE_URL = "https://demotiles.maplibre.org/style.json";
|
|
3
|
+
var DEFAULT_STADIA_STYLE_URL = "https://tiles.stadiamaps.com/styles/osm_bright.json";
|
|
4
|
+
var STYLE_MAP = {
|
|
5
|
+
default: DEFAULT_STADIA_STYLE_URL,
|
|
6
|
+
"alidade-smooth": "https://tiles.stadiamaps.com/styles/alidade_smooth.json",
|
|
7
|
+
"alidade-smooth-dark": "https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json",
|
|
8
|
+
"maplibre-default": MAPLIBRE_DEFAULT_STYLE_URL,
|
|
9
|
+
"osm-bright": "https://tiles.stadiamaps.com/styles/osm_bright.json",
|
|
10
|
+
"stadia-outdoors": "https://tiles.stadiamaps.com/styles/outdoors.json",
|
|
11
|
+
"stamen-toner": "https://tiles.stadiamaps.com/styles/stamen_toner.json",
|
|
12
|
+
"stamen-terrain": "https://tiles.stadiamaps.com/styles/stamen_terrain.json",
|
|
13
|
+
"stamen-watercolor": "https://tiles.stadiamaps.com/styles/stamen_watercolor.json"
|
|
14
|
+
};
|
|
15
|
+
var HTTP_URL_REGEX = /^https?:\/\//i;
|
|
16
|
+
function isStadiaMapsUrl(url) {
|
|
17
|
+
try {
|
|
18
|
+
const parsed = new URL(url);
|
|
19
|
+
return parsed.hostname === "tiles.stadiamaps.com";
|
|
20
|
+
} catch {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function assertStadiaApiKey(stadiaApiKey) {
|
|
25
|
+
if (!stadiaApiKey.trim()) {
|
|
26
|
+
throw new Error(
|
|
27
|
+
"A non-empty stadiaApiKey is required for Stadia Maps style URLs."
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function appendStadiaApiKey(styleUrl, stadiaApiKey) {
|
|
32
|
+
if (!isStadiaMapsUrl(styleUrl)) {
|
|
33
|
+
return styleUrl;
|
|
34
|
+
}
|
|
35
|
+
assertStadiaApiKey(stadiaApiKey);
|
|
36
|
+
const parsed = new URL(styleUrl);
|
|
37
|
+
if (!parsed.searchParams.has("api_key")) {
|
|
38
|
+
parsed.searchParams.set("api_key", stadiaApiKey);
|
|
39
|
+
}
|
|
40
|
+
return parsed.toString();
|
|
41
|
+
}
|
|
42
|
+
function getMapLibreStyleUrl(value, stadiaApiKey) {
|
|
43
|
+
if (!value || typeof value !== "string") {
|
|
44
|
+
return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);
|
|
45
|
+
}
|
|
46
|
+
if (STYLE_MAP[value]) {
|
|
47
|
+
return appendStadiaApiKey(STYLE_MAP[value], stadiaApiKey);
|
|
48
|
+
}
|
|
49
|
+
if (HTTP_URL_REGEX.test(value)) {
|
|
50
|
+
return appendStadiaApiKey(value, stadiaApiKey);
|
|
51
|
+
}
|
|
52
|
+
return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// src/utils/googleMapLinks.ts
|
|
56
|
+
function generateGoogleMapLink(latitude, longitude, zoom = 15) {
|
|
57
|
+
return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;
|
|
58
|
+
}
|
|
59
|
+
function generateGoogleDirectionsLink(latitude, longitude) {
|
|
60
|
+
return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export { DEFAULT_STADIA_STYLE_URL, MAPLIBRE_DEFAULT_STYLE_URL, appendStadiaApiKey, generateGoogleDirectionsLink, generateGoogleMapLink, getMapLibreStyleUrl };
|
|
64
|
+
//# sourceMappingURL=index.js.map
|
|
65
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/utils/getMapLibreStyleUrl.ts","../../src/utils/googleMapLinks.ts"],"names":[],"mappings":";AAAA,IAAM,0BAAA,GAA6B;AACnC,IAAM,wBAAA,GACJ;AAEF,IAAM,SAAA,GAAoC;AAAA,EACxC,OAAA,EAAS,wBAAA;AAAA,EACT,gBAAA,EAAkB,yDAAA;AAAA,EAClB,qBAAA,EAAuB,8DAAA;AAAA,EACvB,kBAAA,EAAoB,0BAAA;AAAA,EACpB,YAAA,EAAc,qDAAA;AAAA,EACd,iBAAA,EAAmB,mDAAA;AAAA,EACnB,cAAA,EAAgB,uDAAA;AAAA,EAChB,gBAAA,EAAkB,yDAAA;AAAA,EAClB,mBAAA,EAAqB;AACvB,CAAA;AAEA,IAAM,cAAA,GAAiB,eAAA;AAIvB,SAAS,gBAAgB,GAAA,EAAsB;AAC7C,EAAA,IAAI;AACF,IAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,GAAG,CAAA;AAC1B,IAAA,OAAO,OAAO,QAAA,KAAa,sBAAA;AAAA,EAC7B,CAAA,CAAA,MAAQ;AACN,IAAA,OAAO,KAAA;AAAA,EACT;AACF;AAEA,SAAS,mBAAmB,YAAA,EAA4B;AACtD,EAAA,IAAI,CAAC,YAAA,CAAa,IAAA,EAAK,EAAG;AACxB,IAAA,MAAM,IAAI,KAAA;AAAA,MACR;AAAA,KACF;AAAA,EACF;AACF;AAEO,SAAS,kBAAA,CACd,UACA,YAAA,EACQ;AACR,EAAA,IAAI,CAAC,eAAA,CAAgB,QAAQ,CAAA,EAAG;AAC9B,IAAA,OAAO,QAAA;AAAA,EACT;AAEA,EAAA,kBAAA,CAAmB,YAAY,CAAA;AAE/B,EAAA,MAAM,MAAA,GAAS,IAAI,GAAA,CAAI,QAAQ,CAAA;AAC/B,EAAA,IAAI,CAAC,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAS,CAAA,EAAG;AACvC,IAAA,MAAA,CAAO,YAAA,CAAa,GAAA,CAAI,SAAA,EAAW,YAAY,CAAA;AAAA,EACjD;AAEA,EAAA,OAAO,OAAO,QAAA,EAAS;AACzB;AAEO,SAAS,mBAAA,CACd,OACA,YAAA,EACQ;AACR,EAAA,IAAI,CAAC,KAAA,IAAS,OAAO,KAAA,KAAU,QAAA,EAAU;AACvC,IAAA,OAAO,kBAAA,CAAmB,0BAA0B,YAAY,CAAA;AAAA,EAClE;AAEA,EAAA,IAAI,SAAA,CAAU,KAAK,CAAA,EAAG;AACpB,IAAA,OAAO,kBAAA,CAAmB,SAAA,CAAU,KAAK,CAAA,EAAG,YAAY,CAAA;AAAA,EAC1D;AAEA,EAAA,IAAI,cAAA,CAAe,IAAA,CAAK,KAAK,CAAA,EAAG;AAC9B,IAAA,OAAO,kBAAA,CAAmB,OAAO,YAAY,CAAA;AAAA,EAC/C;AAEA,EAAA,OAAO,kBAAA,CAAmB,0BAA0B,YAAY,CAAA;AAClE;;;ACxEO,SAAS,qBAAA,CACd,QAAA,EACA,SAAA,EACA,IAAA,GAAO,EAAA,EACC;AACR,EAAA,OAAO,CAAA,6BAAA,EAAgC,QAAQ,CAAA,CAAA,EAAI,SAAS,IAAI,IAAI,CAAA,CAAA,CAAA;AACtE;AAEO,SAAS,4BAAA,CACd,UACA,SAAA,EACQ;AACR,EAAA,OAAO,CAAA,mDAAA,EAAsD,QAAQ,CAAA,CAAA,EAAI,SAAS,CAAA,CAAA;AACpF","file":"index.js","sourcesContent":["const MAPLIBRE_DEFAULT_STYLE_URL = \"https://demotiles.maplibre.org/style.json\";\nconst DEFAULT_STADIA_STYLE_URL =\n \"https://tiles.stadiamaps.com/styles/osm_bright.json\";\n\nconst STYLE_MAP: Record<string, string> = {\n default: DEFAULT_STADIA_STYLE_URL,\n \"alidade-smooth\": \"https://tiles.stadiamaps.com/styles/alidade_smooth.json\",\n \"alidade-smooth-dark\": \"https://tiles.stadiamaps.com/styles/alidade_smooth_dark.json\",\n \"maplibre-default\": MAPLIBRE_DEFAULT_STYLE_URL,\n \"osm-bright\": \"https://tiles.stadiamaps.com/styles/osm_bright.json\",\n \"stadia-outdoors\": \"https://tiles.stadiamaps.com/styles/outdoors.json\",\n \"stamen-toner\": \"https://tiles.stadiamaps.com/styles/stamen_toner.json\",\n \"stamen-terrain\": \"https://tiles.stadiamaps.com/styles/stamen_terrain.json\",\n \"stamen-watercolor\": \"https://tiles.stadiamaps.com/styles/stamen_watercolor.json\"\n};\n\nconst HTTP_URL_REGEX = /^https?:\\/\\//i;\n\nexport type MapLibreBuiltInStyle = keyof typeof STYLE_MAP;\n\nfunction isStadiaMapsUrl(url: string): boolean {\n try {\n const parsed = new URL(url);\n return parsed.hostname === \"tiles.stadiamaps.com\";\n } catch {\n return false;\n }\n}\n\nfunction assertStadiaApiKey(stadiaApiKey: string): void {\n if (!stadiaApiKey.trim()) {\n throw new Error(\n \"A non-empty stadiaApiKey is required for Stadia Maps style URLs.\"\n );\n }\n}\n\nexport function appendStadiaApiKey(\n styleUrl: string,\n stadiaApiKey: string\n): string {\n if (!isStadiaMapsUrl(styleUrl)) {\n return styleUrl;\n }\n\n assertStadiaApiKey(stadiaApiKey);\n\n const parsed = new URL(styleUrl);\n if (!parsed.searchParams.has(\"api_key\")) {\n parsed.searchParams.set(\"api_key\", stadiaApiKey);\n }\n\n return parsed.toString();\n}\n\nexport function getMapLibreStyleUrl(\n value: string | undefined,\n stadiaApiKey: string\n): string {\n if (!value || typeof value !== \"string\") {\n return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);\n }\n\n if (STYLE_MAP[value]) {\n return appendStadiaApiKey(STYLE_MAP[value], stadiaApiKey);\n }\n\n if (HTTP_URL_REGEX.test(value)) {\n return appendStadiaApiKey(value, stadiaApiKey);\n }\n\n return appendStadiaApiKey(DEFAULT_STADIA_STYLE_URL, stadiaApiKey);\n}\n\nexport { DEFAULT_STADIA_STYLE_URL, MAPLIBRE_DEFAULT_STYLE_URL };\n","export function generateGoogleMapLink(\n latitude: number,\n longitude: number,\n zoom = 15\n): string {\n return `https://www.google.com/maps/@${latitude},${longitude},${zoom}z`;\n}\n\nexport function generateGoogleDirectionsLink(\n latitude: number,\n longitude: number\n): string {\n return `https://www.google.com/maps/dir/?api=1&destination=${latitude},${longitude}`;\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@page-speed/maps",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Performance-optimized MapLibre React components and style utilities for DashTrack.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"maplibre",
|
|
8
|
+
"maps",
|
|
9
|
+
"stadia",
|
|
10
|
+
"page-speed",
|
|
11
|
+
"tree-shakable",
|
|
12
|
+
"dashtrack"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/opensite-ai/page-speed-maps#readme",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/opensite-ai/page-speed-maps.git"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/opensite-ai/page-speed-maps/issues"
|
|
21
|
+
},
|
|
22
|
+
"author": "OpenSite AI (https://opensite.ai)",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"private": false,
|
|
25
|
+
"type": "module",
|
|
26
|
+
"main": "./dist/index.cjs",
|
|
27
|
+
"module": "./dist/index.js",
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
|
+
"files": [
|
|
30
|
+
"dist",
|
|
31
|
+
"README.md",
|
|
32
|
+
"LICENSE"
|
|
33
|
+
],
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"import": "./dist/index.js",
|
|
42
|
+
"require": "./dist/index.cjs"
|
|
43
|
+
},
|
|
44
|
+
"./core": {
|
|
45
|
+
"types": "./dist/core/index.d.ts",
|
|
46
|
+
"import": "./dist/core/index.js",
|
|
47
|
+
"require": "./dist/core/index.cjs"
|
|
48
|
+
},
|
|
49
|
+
"./core/map-libre": {
|
|
50
|
+
"types": "./dist/core/MapLibre.d.ts",
|
|
51
|
+
"import": "./dist/core/MapLibre.js",
|
|
52
|
+
"require": "./dist/core/MapLibre.cjs"
|
|
53
|
+
},
|
|
54
|
+
"./utils": {
|
|
55
|
+
"types": "./dist/utils/index.d.ts",
|
|
56
|
+
"import": "./dist/utils/index.js",
|
|
57
|
+
"require": "./dist/utils/index.cjs"
|
|
58
|
+
},
|
|
59
|
+
"./utils/style-url": {
|
|
60
|
+
"types": "./dist/utils/getMapLibreStyleUrl.d.ts",
|
|
61
|
+
"import": "./dist/utils/getMapLibreStyleUrl.js",
|
|
62
|
+
"require": "./dist/utils/getMapLibreStyleUrl.cjs"
|
|
63
|
+
},
|
|
64
|
+
"./utils/google-links": {
|
|
65
|
+
"types": "./dist/utils/googleMapLinks.d.ts",
|
|
66
|
+
"import": "./dist/utils/googleMapLinks.js",
|
|
67
|
+
"require": "./dist/utils/googleMapLinks.cjs"
|
|
68
|
+
},
|
|
69
|
+
"./types": {
|
|
70
|
+
"types": "./dist/types/index.d.ts",
|
|
71
|
+
"import": "./dist/types/index.js",
|
|
72
|
+
"require": "./dist/types/index.cjs"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "tsup",
|
|
77
|
+
"dev": "tsup --watch",
|
|
78
|
+
"test": "vitest",
|
|
79
|
+
"test:ci": "vitest run",
|
|
80
|
+
"test:coverage": "vitest run --coverage",
|
|
81
|
+
"type-check": "tsc --noEmit",
|
|
82
|
+
"bundle-analysis": "node scripts/analyze-bundle.mjs",
|
|
83
|
+
"prepublish": "pnpm run build && pnpm run type-check && pnpm run test:ci",
|
|
84
|
+
"prepublishOnly": "pnpm run prepublish"
|
|
85
|
+
},
|
|
86
|
+
"peerDependencies": {
|
|
87
|
+
"react": ">=18.0.0",
|
|
88
|
+
"react-dom": ">=18.0.0"
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"maplibre-gl": "^5.18.0",
|
|
92
|
+
"react-map-gl": "^8.1.0"
|
|
93
|
+
},
|
|
94
|
+
"devDependencies": {
|
|
95
|
+
"@testing-library/dom": "^10.4.1",
|
|
96
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
97
|
+
"@testing-library/react": "^16.3.0",
|
|
98
|
+
"@types/node": "^24.10.0",
|
|
99
|
+
"@types/react": "^18.3.12",
|
|
100
|
+
"@types/react-dom": "^18.3.1",
|
|
101
|
+
"@vitest/coverage-v8": "^4.0.10",
|
|
102
|
+
"jsdom": "^27.2.0",
|
|
103
|
+
"tsup": "^8.5.1",
|
|
104
|
+
"typescript": "^5.7.2",
|
|
105
|
+
"vitest": "^4.0.10"
|
|
106
|
+
},
|
|
107
|
+
"packageManager": "pnpm@10.24.0",
|
|
108
|
+
"engines": {
|
|
109
|
+
"node": ">=18.0.0",
|
|
110
|
+
"pnpm": ">=9.0.0"
|
|
111
|
+
}
|
|
112
|
+
}
|