@unmap/sdk 0.1.3 → 0.2.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/README.md +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ await unmap.router.isochrone([-114.07, 51.05], { minutes: [10, 20] })
|
|
|
34
34
|
| `gateway` | `string` | API base URL. Defaults to `https://api.unmap.dev`. |
|
|
35
35
|
| `container` | `string \| HTMLElement` | Mount a map here. Omit for geocoding and routing only. |
|
|
36
36
|
| `style` | `string` | `calgary` (default), `montreal`, `iqaluit`, or a full style URL. |
|
|
37
|
-
| `flavor` | `string` | `base` (default), `muted`, `
|
|
37
|
+
| `flavor` | `string` | `base` (default), `muted`, `outdoor`, `decimal`, `blueprint`, or `<style>-<mode>`. |
|
|
38
38
|
| `mode` | `string` | `light` or `dark`. Overrides the mode half of `flavor`. |
|
|
39
39
|
| `lang` | `string` | Label language, e.g. `fr`. Omit to follow the browser's `Accept-Language`. |
|
|
40
40
|
| `theme` | `string` | A `ut1.` theme code from [unmap.dev/create](https://unmap.dev/create). |
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Map } from '@unmap/maps';
|
|
2
|
-
export { DEMO_CITIES, DemoCity, Map, StyleInput, UnmapMapOptions, createMap, maplibregl, unmapStyle } from '@unmap/maps';
|
|
2
|
+
export { DEMO_CITIES, DemoCity, Map, STYLE_NAMES, StyleInput, StyleName, UnmapMapOptions, createMap, maplibregl, unmapStyle } from '@unmap/maps';
|
|
3
3
|
import { Geocoder } from '@unmap/geocoding';
|
|
4
4
|
export * from '@unmap/geocoding';
|
|
5
5
|
import { Router } from '@unmap/routing';
|
|
@@ -12,11 +12,11 @@ interface UnmapOptions {
|
|
|
12
12
|
container?: string | HTMLElement;
|
|
13
13
|
style?: string;
|
|
14
14
|
flavor?: string;
|
|
15
|
-
/** "light" or "dark".
|
|
15
|
+
/** "light" or "dark". Selects the mode half of the named style. */
|
|
16
16
|
mode?: string;
|
|
17
17
|
/** Label language, e.g. "fr". Omit to follow the request's Accept-Language. */
|
|
18
18
|
lang?: string;
|
|
19
|
-
/** Compact `ut1.` theme code from unmap.dev/create. Wins over
|
|
19
|
+
/** Compact `ut1.` theme code from unmap.dev/create. Wins over the path style on the gateway. */
|
|
20
20
|
theme?: string;
|
|
21
21
|
center?: [number, number];
|
|
22
22
|
zoom?: number;
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Geocoder } from "@unmap/geocoding";
|
|
|
4
4
|
import { Router } from "@unmap/routing";
|
|
5
5
|
export * from "@unmap/geocoding";
|
|
6
6
|
export * from "@unmap/routing";
|
|
7
|
-
import { createMap as createMap2, unmapStyle, DEMO_CITIES, maplibregl } from "@unmap/maps";
|
|
7
|
+
import { createMap as createMap2, unmapStyle, DEMO_CITIES, STYLE_NAMES, maplibregl } from "@unmap/maps";
|
|
8
8
|
var Unmap = class {
|
|
9
9
|
geocoder;
|
|
10
10
|
router;
|
|
@@ -19,6 +19,7 @@ var Unmap = class {
|
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
21
21
|
DEMO_CITIES,
|
|
22
|
+
STYLE_NAMES,
|
|
22
23
|
Unmap,
|
|
23
24
|
createMap2 as createMap,
|
|
24
25
|
maplibregl,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createMap, type Map as MaplibreMap, type UnmapMapOptions } from \"@unmap/maps\";\nimport { Geocoder } from \"@unmap/geocoding\";\nimport { Router } from \"@unmap/routing\";\n\nexport * from \"@unmap/geocoding\";\nexport * from \"@unmap/routing\";\nexport { createMap, unmapStyle, DEMO_CITIES, maplibregl } from \"@unmap/maps\";\nexport type { Map, UnmapMapOptions, DemoCity, StyleInput } from \"@unmap/maps\";\n\nexport interface UnmapOptions {\n key: string;\n gateway?: string;\n /** If provided, a map is mounted in this container. */\n container?: string | HTMLElement;\n style?: string;\n flavor?: string;\n /** \"light\" or \"dark\".
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { createMap, type Map as MaplibreMap, type UnmapMapOptions } from \"@unmap/maps\";\nimport { Geocoder } from \"@unmap/geocoding\";\nimport { Router } from \"@unmap/routing\";\n\nexport * from \"@unmap/geocoding\";\nexport * from \"@unmap/routing\";\nexport { createMap, unmapStyle, DEMO_CITIES, STYLE_NAMES, maplibregl } from \"@unmap/maps\";\nexport type { Map, UnmapMapOptions, DemoCity, StyleName, StyleInput } from \"@unmap/maps\";\n\nexport interface UnmapOptions {\n key: string;\n gateway?: string;\n /** If provided, a map is mounted in this container. */\n container?: string | HTMLElement;\n style?: string;\n flavor?: string;\n /** \"light\" or \"dark\". Selects the mode half of the named style. */\n mode?: string;\n /** Label language, e.g. \"fr\". Omit to follow the request's Accept-Language. */\n lang?: string;\n /** Compact `ut1.` theme code from unmap.dev/create. Wins over the path style on the gateway. */\n theme?: string;\n center?: [number, number];\n zoom?: number;\n}\n\n/**\n * One Stripe-style key, the whole platform. With a `container` you get a rendered map;\n * `geocoder` and `router` are always available.\n *\n * const map = new Unmap({ key: \"um_live_...\", container: \"#map\", center: [-75.69, 45.42] });\n */\nexport class Unmap {\n readonly geocoder: Geocoder;\n readonly router: Router;\n readonly map?: MaplibreMap;\n\n constructor(opts: UnmapOptions) {\n this.geocoder = new Geocoder(opts);\n this.router = new Router(opts);\n if (opts.container) {\n this.map = createMap({ ...opts, container: opts.container } as UnmapMapOptions);\n }\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAgE;AACzE,SAAS,gBAAgB;AACzB,SAAS,cAAc;AAEvB,cAAc;AACd,cAAc;AACd,SAAS,aAAAA,YAAW,YAAY,aAAa,aAAa,kBAAkB;AA0BrE,IAAM,QAAN,MAAY;AAAA,EACR;AAAA,EACA;AAAA,EACA;AAAA,EAET,YAAY,MAAoB;AAC9B,SAAK,WAAW,IAAI,SAAS,IAAI;AACjC,SAAK,SAAS,IAAI,OAAO,IAAI;AAC7B,QAAI,KAAK,WAAW;AAClB,WAAK,MAAM,UAAU,EAAE,GAAG,MAAM,WAAW,KAAK,UAAU,CAAoB;AAAA,IAChF;AAAA,EACF;AACF;","names":["createMap"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unmap/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "One key, the whole unmap platform: map + geocoder + router",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"access": "public"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@unmap/
|
|
43
|
-
"@unmap/
|
|
44
|
-
"@unmap/
|
|
45
|
-
"@unmap/
|
|
42
|
+
"@unmap/geocoding": "0.2.0",
|
|
43
|
+
"@unmap/core": "0.2.0",
|
|
44
|
+
"@unmap/routing": "0.2.0",
|
|
45
|
+
"@unmap/maps": "0.2.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"tsup": "^8.3.0",
|