Compare commits

...

3 Commits

Author SHA1 Message Date
dependabot[bot] cb83ec7e63 Bump stylelint from 16.14.0 to 16.14.1 (#1036)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [stylelint](https://github.com/stylelint/stylelint) from 16.14.0
to 16.14.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/stylelint/stylelint/releases">stylelint's
releases</a>.</em></p>
<blockquote>
<h2>16.4.1</h2>
<ul>
<li>Fixed: incompatible cache file format (<a
href="https://redirect.github.com/stylelint/stylelint/issues/8359">#8359</a>)
(<a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md">stylelint's
changelog</a>.</em></p>
<blockquote>
<h2>16.14.1 - 2025-01-27</h2>
<p>It fixes a bug with caching.</p>
<ul>
<li>Fixed: incompatible cache file format (<a
href="https://redirect.github.com/stylelint/stylelint/pull/8359">#8359</a>)
(<a
href="https://github.com/romainmenke"><code>@​romainmenke</code></a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/stylelint/stylelint/commit/92eae1d7ed2f4be819283adaeb6b0b360b9953b9"><code>92eae1d</code></a>
16.14.1</li>
<li><a
href="https://github.com/stylelint/stylelint/commit/578a5ac16f71768d98c0bf05503e253e87bc4427"><code>578a5ac</code></a>
Prepare 16.14.1 (<a
href="https://redirect.github.com/stylelint/stylelint/issues/8360">#8360</a>)</li>
<li><a
href="https://github.com/stylelint/stylelint/commit/8c4fc4a1b3a77df2b879daf7bbbe9e9be55fe1d5"><code>8c4fc4a</code></a>
Fix incompatible cache file format (<a
href="https://redirect.github.com/stylelint/stylelint/issues/8359">#8359</a>)</li>
<li><a
href="https://github.com/stylelint/stylelint/commit/c33ad7dd0a53151071dc81fbba42504b0687301d"><code>c33ad7d</code></a>
Refactor at-rule regexes for clarity (<a
href="https://redirect.github.com/stylelint/stylelint/issues/8350">#8350</a>)</li>
<li>See full diff in <a
href="https://github.com/stylelint/stylelint/compare/16.14.0...16.14.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=stylelint&package-manager=npm_and_yarn&previous-version=16.14.0&new-version=16.14.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 13:47:16 +00:00
dependabot[bot] c95bd6434f Bump typescript-eslint from 8.21.0 to 8.22.0 (#1035)
Bumps
[typescript-eslint](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/typescript-eslint)
from 8.21.0 to 8.22.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/releases">typescript-eslint's
releases</a>.</em></p>
<blockquote>
<h2>v8.22.0</h2>
<h2>8.22.0 (2025-01-27)</h2>
<h3>🚀 Features</h3>
<ul>
<li><strong>parser:</strong> add standalone isolatedDeclarations option
(<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10499">#10499</a>)</li>
</ul>
<h3>🩹 Fixes</h3>
<ul>
<li><strong>eslint-plugin:</strong> [prefer-nullish-coalescing] doesn't
report on ternary but on equivalent || (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10517">#10517</a>)</li>
<li><strong>eslint-plugin:</strong> [no-duplicate-type-constituents]
handle nested types (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10638">#10638</a>)</li>
<li><strong>eslint-plugin:</strong> [no-shadow] don't report
unnecessarily on valid ways of using module augmentation (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10616">#10616</a>)</li>
<li><strong>eslint-plugin:</strong> [no-extraneous-class] handle
accessor keyword (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10678">#10678</a>)</li>
<li><strong>eslint-plugin:</strong> [prefer-readonly] autofixer doesn't
add type to property that is mutated in the constructor (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10552">#10552</a>)</li>
<li><strong>eslint-plugin:</strong> [no-unnecessary-template-expression]
handle template literal type (<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10612">#10612</a>)</li>
<li><strong>type-utils:</strong> support matching intersection types in
<code>TypeOrValueSpecifier</code> with a <code>PackageSpecifier</code>
(<a
href="https://redirect.github.com/typescript-eslint/typescript-eslint/pull/10667">#10667</a>)</li>
</ul>
<h3>❤️ Thank You</h3>
<ul>
<li>Josh Goldberg </li>
<li>mdm317</li>
<li>Olivier Zalmanski <a
href="https://github.com/OlivierZal"><code>@​OlivierZal</code></a></li>
<li>Ronen Amiel</li>
<li>YeonJuan <a
href="https://github.com/yeonjuan"><code>@​yeonjuan</code></a></li>
</ul>
<p>You can read about our <a
href="https://main--typescript-eslint.netlify.app/users/versioning">versioning
strategy</a> and <a
href="https://main--typescript-eslint.netlify.app/users/releases">releases</a>
on our website.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/typescript-eslint/CHANGELOG.md">typescript-eslint's
changelog</a>.</em></p>
<blockquote>
<h2>8.22.0 (2025-01-27)</h2>
<p>This was a version bump only for typescript-eslint to align it with
other projects, there were no code changes.</p>
<p>You can read about our <a
href="https://main--typescript-eslint.netlify.app/users/versioning">versioning
strategy</a> and <a
href="https://main--typescript-eslint.netlify.app/users/releases">releases</a>
on our website.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/typescript-eslint/typescript-eslint/commit/94e809808a445dde05ab6f284dec010269482eb5"><code>94e8098</code></a>
chore(release): publish 8.22.0</li>
<li>See full diff in <a
href="https://github.com/typescript-eslint/typescript-eslint/commits/v8.22.0/packages/typescript-eslint">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript-eslint&package-manager=npm_and_yarn&previous-version=8.21.0&new-version=8.22.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-28 13:46:30 +00:00
Birk Skyum abf3bd1fa0 Fix insertion of access tokens, when swapping renderer (#1021)
Going from e.g. MapTiler to OpenLayers and back will lose the maptlier
key.

This code finds the urls in the style that has "{key}" and insert the
correct API keys

Fixes the error reported here, cc @nyurik 
- Fixes
https://github.com/maplibre/maputnik/issues/874#issuecomment-2605896666

Related to:
- https://github.com/maplibre/maputnik/issues/869

## Launch Checklist

<!-- Thanks for the PR! Feel free to add or remove items from the
checklist. -->


 - [ ] Briefly describe the changes in this PR.
 - [ ] Link to related issues.
- [ ] Include before/after visuals or gifs if this PR includes visual
changes.
 - [ ] Write tests for all new functionality.
 - [ ] Add an entry to `CHANGELOG.md` under the `## main` section.
2025-01-28 12:57:38 +00:00
5 changed files with 116 additions and 68 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ jobs:
strategy:
fail-fast: false
matrix:
browser: [chrome, firefox]
browser: [chrome]
runs-on: ubuntu-22.04
steps:
+36 -1
View File
@@ -1,7 +1,8 @@
import { MaputnikDriver } from "./maputnik-driver";
import tokens from "../../src/config/tokens.json" with {type: "json"};
describe("modals", () => {
const { beforeAndAfter, when, get, then } = new MaputnikDriver();
const { beforeAndAfter, when, get, given, then } = new MaputnikDriver();
beforeAndAfter();
beforeEach(() => {
@@ -235,6 +236,40 @@ describe("modals", () => {
metadata: { "maputnik:renderer": "ol" },
});
});
it("inlcude API key when change renderer", () => {
when.click("modal:settings.close-modal")
when.click("nav:open");
get.elementByAttribute('aria-label', "MapTiler Basic").should('exist').click();
when.click("nav:settings");
when.select("modal:settings.maputnik:renderer", "mlgljs");
then(get.inputValue("modal:settings.maputnik:renderer")).shouldEqual(
"mlgljs"
);
when.select("modal:settings.maputnik:renderer", "ol");
then(get.inputValue("modal:settings.maputnik:renderer")).shouldEqual(
"ol"
);
given.intercept("https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key=*", "tileRequest", "GET");
when.select("modal:settings.maputnik:renderer", "mlgljs");
then(get.inputValue("modal:settings.maputnik:renderer")).shouldEqual(
"mlgljs"
);
when.waitForResponse("tileRequest").its("request").its("url").should("include", `https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key=${tokens.openmaptiles}`);
when.waitForResponse("tileRequest").its("request").its("url").should("include", `https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key=${tokens.openmaptiles}`);
when.waitForResponse("tileRequest").its("request").its("url").should("include", `https://api.maptiler.com/tiles/v3-openmaptiles/tiles.json?key=${tokens.openmaptiles}`);
});
});
describe("sources", () => {
+56 -64
View File
@@ -106,11 +106,11 @@
"postcss": "^8.5.1",
"react-hot-loader": "^4.13.1",
"sass": "^1.83.4",
"stylelint": "^16.14.0",
"stylelint": "^16.14.1",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-scss": "^6.10.1",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"typescript-eslint": "^8.22.0",
"uuid": "^11.0.5",
"vite": "^6.0.11",
"vite-plugin-istanbul": "^6.0.2"
@@ -3244,17 +3244,17 @@
}
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.21.0.tgz",
"integrity": "sha512-eTH+UOR4I7WbdQnG4Z48ebIA6Bgi7WO8HvFEneeYBxG8qCOYgTOFPSg6ek9ITIDvGjDQzWHcoWHCDO2biByNzA==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.22.0.tgz",
"integrity": "sha512-4Uta6REnz/xEJMvwf72wdUnC3rr4jAQf5jnTkeRQ9b6soxLxhDEbS/pfMPoJLDfFPNVRdryqWUIV/2GZzDJFZw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/regexpp": "^4.10.0",
"@typescript-eslint/scope-manager": "8.21.0",
"@typescript-eslint/type-utils": "8.21.0",
"@typescript-eslint/utils": "8.21.0",
"@typescript-eslint/visitor-keys": "8.21.0",
"@typescript-eslint/scope-manager": "8.22.0",
"@typescript-eslint/type-utils": "8.22.0",
"@typescript-eslint/utils": "8.22.0",
"@typescript-eslint/visitor-keys": "8.22.0",
"graphemer": "^1.4.0",
"ignore": "^5.3.1",
"natural-compare": "^1.4.0",
@@ -3274,16 +3274,16 @@
}
},
"node_modules/@typescript-eslint/parser": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.21.0.tgz",
"integrity": "sha512-Wy+/sdEH9kI3w9civgACwabHbKl+qIOu0uFZ9IMKzX3Jpv9og0ZBJrZExGrPpFAY7rWsXuxs5e7CPPP17A4eYA==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.22.0.tgz",
"integrity": "sha512-MqtmbdNEdoNxTPzpWiWnqNac54h8JDAmkWtJExBVVnSrSmi9z+sZUt0LfKqk9rjqmKOIeRhO4fHHJ1nQIjduIQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/scope-manager": "8.21.0",
"@typescript-eslint/types": "8.21.0",
"@typescript-eslint/typescript-estree": "8.21.0",
"@typescript-eslint/visitor-keys": "8.21.0",
"@typescript-eslint/scope-manager": "8.22.0",
"@typescript-eslint/types": "8.22.0",
"@typescript-eslint/typescript-estree": "8.22.0",
"@typescript-eslint/visitor-keys": "8.22.0",
"debug": "^4.3.4"
},
"engines": {
@@ -3299,14 +3299,14 @@
}
},
"node_modules/@typescript-eslint/scope-manager": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.21.0.tgz",
"integrity": "sha512-G3IBKz0/0IPfdeGRMbp+4rbjfSSdnGkXsM/pFZA8zM9t9klXDnB/YnKOBQ0GoPmoROa4bCq2NeHgJa5ydsQ4mA==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.22.0.tgz",
"integrity": "sha512-/lwVV0UYgkj7wPSw0o8URy6YI64QmcOdwHuGuxWIYznO6d45ER0wXUbksr9pYdViAofpUCNJx/tAzNukgvaaiQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.21.0",
"@typescript-eslint/visitor-keys": "8.21.0"
"@typescript-eslint/types": "8.22.0",
"@typescript-eslint/visitor-keys": "8.22.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3317,14 +3317,14 @@
}
},
"node_modules/@typescript-eslint/type-utils": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.21.0.tgz",
"integrity": "sha512-95OsL6J2BtzoBxHicoXHxgk3z+9P3BEcQTpBKriqiYzLKnM2DeSqs+sndMKdamU8FosiadQFT3D+BSL9EKnAJQ==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.22.0.tgz",
"integrity": "sha512-NzE3aB62fDEaGjaAYZE4LH7I1MUwHooQ98Byq0G0y3kkibPJQIXVUspzlFOmOfHhiDLwKzMlWxaNv+/qcZurJA==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/typescript-estree": "8.21.0",
"@typescript-eslint/utils": "8.21.0",
"@typescript-eslint/typescript-estree": "8.22.0",
"@typescript-eslint/utils": "8.22.0",
"debug": "^4.3.4",
"ts-api-utils": "^2.0.0"
},
@@ -3341,9 +3341,9 @@
}
},
"node_modules/@typescript-eslint/types": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.21.0.tgz",
"integrity": "sha512-PAL6LUuQwotLW2a8VsySDBwYMm129vFm4tMVlylzdoTybTHaAi0oBp7Ac6LhSrHHOdLM3efH+nAR6hAWoMF89A==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.22.0.tgz",
"integrity": "sha512-0S4M4baNzp612zwpD4YOieP3VowOARgK2EkN/GBn95hpyF8E2fbMT55sRHWBq+Huaqk3b3XK+rxxlM8sPgGM6A==",
"dev": true,
"license": "MIT",
"engines": {
@@ -3355,14 +3355,14 @@
}
},
"node_modules/@typescript-eslint/typescript-estree": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.21.0.tgz",
"integrity": "sha512-x+aeKh/AjAArSauz0GiQZsjT8ciadNMHdkUSwBB9Z6PrKc/4knM4g3UfHml6oDJmKC88a6//cdxnO/+P2LkMcg==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.22.0.tgz",
"integrity": "sha512-SJX99NAS2ugGOzpyhMza/tX+zDwjvwAtQFLsBo3GQxiGcvaKlqGBkmZ+Y1IdiSi9h4Q0Lr5ey+Cp9CGWNY/F/w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.21.0",
"@typescript-eslint/visitor-keys": "8.21.0",
"@typescript-eslint/types": "8.22.0",
"@typescript-eslint/visitor-keys": "8.22.0",
"debug": "^4.3.4",
"fast-glob": "^3.3.2",
"is-glob": "^4.0.3",
@@ -3382,16 +3382,16 @@
}
},
"node_modules/@typescript-eslint/utils": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.21.0.tgz",
"integrity": "sha512-xcXBfcq0Kaxgj7dwejMbFyq7IOHgpNMtVuDveK7w3ZGwG9owKzhALVwKpTF2yrZmEwl9SWdetf3fxNzJQaVuxw==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.22.0.tgz",
"integrity": "sha512-T8oc1MbF8L+Bk2msAvCUzjxVB2Z2f+vXYfcucE2wOmYs7ZUwco5Ep0fYZw8quNwOiw9K8GYVL+Kgc2pETNTLOg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@eslint-community/eslint-utils": "^4.4.0",
"@typescript-eslint/scope-manager": "8.21.0",
"@typescript-eslint/types": "8.21.0",
"@typescript-eslint/typescript-estree": "8.21.0"
"@typescript-eslint/scope-manager": "8.22.0",
"@typescript-eslint/types": "8.22.0",
"@typescript-eslint/typescript-estree": "8.22.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
@@ -3406,13 +3406,13 @@
}
},
"node_modules/@typescript-eslint/visitor-keys": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.21.0.tgz",
"integrity": "sha512-BkLMNpdV6prozk8LlyK/SOoWLmUFi+ZD+pcqti9ILCbVvHGk1ui1g4jJOc2WDLaeExz2qWwojxlPce5PljcT3w==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.22.0.tgz",
"integrity": "sha512-AWpYAXnUgvLNabGTy3uBylkgZoosva/miNd1I8Bz3SjotmQPbVqhO4Cczo8AsZ44XVErEBPr/CRSgaj8sG7g0w==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/types": "8.21.0",
"@typescript-eslint/types": "8.22.0",
"eslint-visitor-keys": "^4.2.0"
},
"engines": {
@@ -4005,6 +4005,7 @@
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
@@ -5845,16 +5846,6 @@
"url": "https://opencollective.com/eslint"
}
},
"node_modules/eslint/node_modules/@eslint/js": {
"version": "9.18.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.18.0.tgz",
"integrity": "sha512-fK6L7rxcq6/z+AaQMtiFTkvbHkBLNlwyRxHpKawP0x3u9+NC6MQTnFW+AdpwC6gfHTW0051cokQgtTN2FqlxQA==",
"dev": true,
"license": "MIT",
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
"node_modules/eslint/node_modules/brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@@ -6925,7 +6916,8 @@
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
"dev": true
"dev": true,
"license": "MIT"
},
"node_modules/gulp-sort": {
"version": "2.0.0",
@@ -11980,9 +11972,9 @@
}
},
"node_modules/stylelint": {
"version": "16.14.0",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.14.0.tgz",
"integrity": "sha512-orePw2dKxzXC0hd1VmxrDBqgf1KUV9DYsZY4guKLE9XcQD7m0BxVnWMaoQqMNsQIG14MyyTHf6zoajvOnDra8g==",
"version": "16.14.1",
"resolved": "https://registry.npmjs.org/stylelint/-/stylelint-16.14.1.tgz",
"integrity": "sha512-oqCL7AC3786oTax35T/nuLL8p2C3k/8rHKAooezrPGRvUX0wX+qqs5kMWh5YYT4PHQgVDobHT4tw55WgpYG6Sw==",
"dev": true,
"funding": [
{
@@ -12696,15 +12688,15 @@
}
},
"node_modules/typescript-eslint": {
"version": "8.21.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.21.0.tgz",
"integrity": "sha512-txEKYY4XMKwPXxNkN8+AxAdX6iIJAPiJbHE/FpQccs/sxw8Lf26kqwC3cn0xkHlW8kEbLhkhCsjWuMveaY9Rxw==",
"version": "8.22.0",
"resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.22.0.tgz",
"integrity": "sha512-Y2rj210FW1Wb6TWXzQc5+P+EWI9/zdS57hLEc0gnyuvdzWo8+Y8brKlbj0muejonhMI/xAZCnZZwjbIfv1CkOw==",
"dev": true,
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "8.21.0",
"@typescript-eslint/parser": "8.21.0",
"@typescript-eslint/utils": "8.21.0"
"@typescript-eslint/eslint-plugin": "8.22.0",
"@typescript-eslint/parser": "8.22.0",
"@typescript-eslint/utils": "8.22.0"
},
"engines": {
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
+2 -2
View File
@@ -137,11 +137,11 @@
"postcss": "^8.5.1",
"react-hot-loader": "^4.13.1",
"sass": "^1.83.4",
"stylelint": "^16.14.0",
"stylelint": "^16.14.1",
"stylelint-config-recommended-scss": "^14.1.0",
"stylelint-scss": "^6.10.1",
"typescript": "^5.7.3",
"typescript-eslint": "^8.21.0",
"typescript-eslint": "^8.22.0",
"uuid": "^11.0.5",
"vite": "^6.0.11",
"vite-plugin-istanbul": "^6.0.2"
+21
View File
@@ -363,6 +363,7 @@ export default class App extends React.Component<any, AppState> {
[property]: value
}
}
this.onStyleChanged(changedStyle)
}
@@ -374,6 +375,24 @@ export default class App extends React.Component<any, AppState> {
...opts,
};
// For the style object, find the urls that has "{key}" and insert the correct API keys
// Without this, going from e.g. MapTiler to OpenLayers and back will lose the maptlier key.
if (newStyle.glyphs && typeof newStyle.glyphs === 'string') {
newStyle.glyphs = setFetchAccessToken(newStyle.glyphs, newStyle);
}
if (newStyle.sprite && typeof newStyle.sprite === 'string') {
newStyle.sprite = setFetchAccessToken(newStyle.sprite, newStyle);
}
for (const [_sourceId, source] of Object.entries(newStyle.sources)) {
if (source && 'url' in source && typeof source.url === 'string') {
source.url = setFetchAccessToken(source.url, newStyle);
}
}
if (opts.initialLoad) {
this.getInitialStateFromUrl(newStyle);
}
@@ -737,6 +756,7 @@ export default class App extends React.Component<any, AppState> {
onLayerSelect={this.onLayerSelect}
/>
} else {
mapElement = <MapMaplibreGl {...mapProps}
onChange={this.onMapChange}
options={this.state.maplibreGlDebugOptions}
@@ -790,6 +810,7 @@ export default class App extends React.Component<any, AppState> {
getInitialStateFromUrl = (mapStyle: StyleSpecification) => {
const url = new URL(location.href);
const modalParam = url.searchParams.get("modal");
if (modalParam && modalParam !== "") {
const modals = modalParam.split(",");
const modalObj: {[key: string]: boolean} = {};