@maptiler/sdk 4.2.0-rc.1 → 4.2.1

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.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Sanitize an untrusted HTML string, such as the attribution a remote TileJSON asks the map to display.
3
+ *
4
+ * Only the elements in `ALLOWED_TAGS` and the attributes in `ALLOWED_ATTRIBUTES` survive; anything else is
5
+ * dropped along with its subtree. An allow list is used rather than a list of known-dangerous markup because
6
+ * the latter silently permits whatever it has not heard of yet, including markup added to HTML after it was
7
+ * written.
8
+ *
9
+ * The sanitized nodes are returned rather than a string: serializing and re-parsing is not a round trip, so
10
+ * a string result lets carefully nested markup mutate into a different - and no longer sanitized - tree.
11
+ */
12
+ export declare function sanitizeHTML(str: string): DocumentFragment;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maptiler/sdk",
3
- "version": "4.2.0-rc.1",
3
+ "version": "4.2.1",
4
4
  "description": "The Javascript & TypeScript map SDK tailored for MapTiler Cloud",
5
5
  "author": "MapTiler",
6
6
  "module": "dist/maptiler-sdk.mjs",
@@ -101,7 +101,7 @@
101
101
  },
102
102
  "dependencies": {
103
103
  "@maplibre/maplibre-gl-style-spec": "^24.7.0",
104
- "@maptiler/client": "^3.1.0-rc.6",
104
+ "@maptiler/client": "^3.1.0",
105
105
  "eslint-plugin-compat": "^6.1.0",
106
106
  "events": "^3.3.0",
107
107
  "gl-matrix": "^3.4.4",
package/dist/routing.d.ts DELETED
@@ -1,18 +0,0 @@
1
- import * as client from "@maptiler/client";
2
- export type ExtraRoutingOptions = {
3
- /**
4
- * Specifies whether the routing request runs with a session logic.
5
- * A "session" is started at the initialization of the SDK and finished when the browser
6
- * page is being closed or refreshed.
7
- * When this option is enabled, extra URL param `mtsid` is added to queries
8
- * to the MapTiler Cloud API. This allows MapTiler to enable "session based billing".
9
- *
10
- * Default: value of this option in global config (which is `true` by default).
11
- */
12
- session?: boolean;
13
- };
14
- export type RoutingOptions = client.RoutingOptions & ExtraRoutingOptions;
15
- export declare const routing: {
16
- directionsPost: (body: client.RoutingRequest, options?: RoutingOptions) => Promise<client.RoutingResponse>;
17
- directionsGet: (req: client.RoutingRequest, options?: RoutingOptions) => Promise<client.RoutingResponse>;
18
- };