@trailstash/ultra 4.2.6 → 4.2.7

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.
@@ -10,7 +10,7 @@ const {
10
10
  width,
11
11
  waitTime,
12
12
  output,
13
- } = minimist(process.argv.slice(2))
13
+ } = minimist(process.argv.slice(2));
14
14
 
15
15
  const browser = await puppeteer.launch({ headless: true });
16
16
 
@@ -50,7 +50,8 @@ async function createImage(exampleName) {
50
50
  console.log(`Timed out waiting for map load on ${exampleName}.`);
51
51
  }
52
52
 
53
- const filename = output || `./docs/assets/${exampleName.replace(".ultra", ".png")}`;
53
+ const filename =
54
+ output || `./docs/assets/${exampleName.replace(".ultra", ".png")}`;
54
55
 
55
56
  await page
56
57
  .screenshot({
@@ -51,7 +51,16 @@ export class MapPopup extends HTMLElement {
51
51
  this.template,
52
52
  this.contextBuilder(f),
53
53
  );
54
- div.appendChild(h("div", {}, DOMPurify.sanitize(html)));
54
+ div.appendChild(
55
+ h(
56
+ "div",
57
+ {},
58
+ DOMPurify.sanitize(html, {
59
+ ALLOWED_URI_REGEXP:
60
+ /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|geo):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i,
61
+ }),
62
+ ),
63
+ );
55
64
  }
56
65
  shadow.appendChild(div);
57
66
  }
@@ -70,7 +70,10 @@ export class StylePicker extends HTMLElement {
70
70
  return;
71
71
  }
72
72
 
73
- const div = h("div", { slot: "modal-content", style: "max-width: 1055px;" });
73
+ const div = h("div", {
74
+ slot: "modal-content",
75
+ style: "max-width: 1055px;",
76
+ });
74
77
  const button = h(
75
78
  "button-modal",
76
79
  { text: "Pick Style", icon: "paintbrush" },
@@ -83,18 +86,16 @@ export class StylePicker extends HTMLElement {
83
86
  if (!stylesByProvider[provider]) {
84
87
  stylesByProvider[provider] = [];
85
88
  }
86
- stylesByProvider[provider].push({name, value});
89
+ stylesByProvider[provider].push({ name, value });
87
90
  }
88
91
  for (const [provider, styles] of Object.entries(stylesByProvider)) {
89
- const div2 = h("div", {style:"display:inline-block;margin-right:1.25em;"});
92
+ const div2 = h("div", {
93
+ style: "display:inline-block;margin-right:1.25em;",
94
+ });
90
95
  div.appendChild(div2);
91
96
  div2.appendChild(h("h3", {}, provider));
92
- for (const {name, value} of styles) {
93
- const styleButton = h(
94
- "button",
95
- {},
96
- name,
97
- );
97
+ for (const { name, value } of styles) {
98
+ const styleButton = h("button", {}, name);
98
99
  styleButton.addEventListener("click", (e) => {
99
100
  button.toggle();
100
101
  this.dispatchEvent(
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "4.2.6",
6
+ "version": "4.2.7",
7
7
  "description": "A web based tool for making MapLibre GL maps with data from sources such as Overpass, GeoJSON, GPX, KML, TCX, etc",
8
8
  "main": "index.js",
9
9
  "scripts": {