@trailstash/ultra 3.0.0-dev3 → 3.0.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.
package/.swp ADDED
Binary file
package/README.md CHANGED
@@ -5,7 +5,7 @@ JS](https://maplibre.org).
5
5
 
6
6
  [Overpass Ultra](https://overpass-ultra.us) is the main deployment of Ultra.
7
7
 
8
- The customization of the map comply with an [extended](https://overpass-ultra.us/docs/style#ultra-maplibre-styles) version
8
+ The customization of the map complies with an [extended](https://overpass-ultra.us/docs/style#ultra-maplibre-styles) version
9
9
  of the the [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/).
10
10
 
11
11
  ## Documentation
@@ -54,10 +54,10 @@ export class CodeEditor extends HTMLElement {
54
54
  textarea.addEventListener("drop", async (e) => {
55
55
  e.preventDefault();
56
56
  const item = e.dataTransfer.items[0];
57
- if (item.kind === "file"){
57
+ if (item.kind === "file") {
58
58
  this.source = await item.getAsFile().text();
59
59
  } else {
60
- this.source = e.dataTransfer.getData('text/plain');
60
+ this.source = e.dataTransfer.getData("text/plain");
61
61
  }
62
62
  });
63
63
  textarea.addEventListener("keydown", (e) => {
package/docs/index.md CHANGED
@@ -7,7 +7,7 @@ JS](https://maplibre.org) and [OpenStreetMap](https://openstreetmap.org) data, p
7
7
  [Overpass API](https://overpass-api.de/) and
8
8
  [`osmtogeojson`](https://github.com/tyrasd/osmtogeojson)
9
9
 
10
- The customization of the map comply with an [extended](https://overpass-ultra.us/docs/style#ultra-maplibre-styles) version
10
+ The customization of the map complies with an [extended](https://overpass-ultra.us/docs/style#ultra-maplibre-styles) version
11
11
  of the the [MapLibre Style Spec](https://maplibre.org/maplibre-style-spec/).
12
12
 
13
13
  ## Documentation
@@ -76,7 +76,7 @@ const detect = async (query) => {
76
76
  const doc = new window.DOMParser().parseFromString(query, "text/xml");
77
77
  if (
78
78
  !doc.querySelector("parsererror") &&
79
- doc.childNodes[0].nodeName === "gpx"
79
+ Array.from(doc.childNodes).some((x) => x.nodeName === "gpx")
80
80
  ) {
81
81
  return query;
82
82
  }
@@ -91,7 +91,8 @@ const detect = async (query) => {
91
91
  }
92
92
  const doc = new window.DOMParser().parseFromString(query, "text/xml");
93
93
  return (
94
- !doc.querySelector("parsererror") && doc.childNodes[0].nodeName === "kml"
94
+ !doc.querySelector("parsererror") &&
95
+ Array.from(doc.childNodes).some((x) => x.nodeName === "kml")
95
96
  );
96
97
  };
97
98
 
@@ -153,7 +153,7 @@ const detectXML = (query) => {
153
153
  const doc = new window.DOMParser().parseFromString(query, "text/xml");
154
154
  if (
155
155
  !doc.querySelector("parsererror") &&
156
- doc.childNodes[0].nodeName === "osm"
156
+ Array.from(doc.childNodes).some((x) => x.nodeName === "osm")
157
157
  ) {
158
158
  return query;
159
159
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "3.0.0-dev3",
6
+ "version": "3.0.1",
7
7
  "description": "A web based tool for making MapLibre GL maps with data from souces such as Overpass, GeoJSON, GPX, KML, TCX, etc",
8
8
  "main": "index.js",
9
9
  "scripts": {
@@ -16,7 +16,7 @@
16
16
  "start:docs": "mkdocs serve",
17
17
  "build:pages": "mkdir -p public && cp -Lr static/* public/.",
18
18
  "start": "node ./bin/run.js serve",
19
- "format": "prettier --print-width=80 --write '**/*@trailstash/ultru.js' '**/*.json' README.md static/index.html '**/*.css'",
19
+ "format": "prettier --print-width=80 --write '**/*.js' '**/*.json' README.md static/index.html '**/*.css'",
20
20
  "test": "echo \"Error: no test specified\" && exit 1"
21
21
  },
22
22
  "type": "module",
@@ -58,7 +58,7 @@
58
58
  "liquidjs": "^10.16.7",
59
59
  "lodash.pick": "^4.4.0",
60
60
  "lz-string": "^1.5.0",
61
- "maplibre-gl": "^4.6.0",
61
+ "maplibre-gl": "^4.7.0",
62
62
  "marked": "^14.1.1",
63
63
  "normalize.css": "^8.0.1",
64
64
  "osmtogeojson": "^3.0.0-beta.5",