@unmap/sdk 0.1.2 → 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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Maps & Apps Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
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`, `relief`, `street`, `outdoor`, or `<style>-<mode>`. |
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". Overrides the mode half of `flavor`. */
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 `flavor` on the gateway. */
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\". Overrides the mode half of `flavor`. */\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 `flavor` 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,kBAAkB;AA0BxD,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"]}
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,7 +1,8 @@
1
1
  {
2
2
  "name": "@unmap/sdk",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "One key, the whole unmap platform: map + geocoder + router",
5
+ "license": "MIT",
5
6
  "keywords": [
6
7
  "unmap",
7
8
  "maps",
@@ -38,10 +39,10 @@
38
39
  "access": "public"
39
40
  },
40
41
  "dependencies": {
41
- "@unmap/maps": "0.1.2",
42
- "@unmap/routing": "0.1.2",
43
- "@unmap/geocoding": "0.1.2",
44
- "@unmap/core": "0.1.2"
42
+ "@unmap/geocoding": "0.2.0",
43
+ "@unmap/core": "0.2.0",
44
+ "@unmap/routing": "0.2.0",
45
+ "@unmap/maps": "0.2.0"
45
46
  },
46
47
  "devDependencies": {
47
48
  "tsup": "^8.3.0",