mirror of
https://github.com/maputnik/editor.git
synced 2026-08-21 20:47:26 +00:00
chore(deps-dev): Bump vite from 7.3.2 to 8.2.1 (#2081)
Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 7.3.2 to 8.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/vitejs/vite/releases">vite's releases</a>.</em></p> <blockquote> <h2>plugin-legacy@8.2.1</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/plugin-legacy@8.2.1/packages/plugin-legacy/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.2.1</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.2.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>create-vite@8.2.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/create-vite@8.2.0/packages/create-vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>plugin-legacy@8.2.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/plugin-legacy@8.2.0/packages/plugin-legacy/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.2.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.2.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.2.0-beta.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.2.0-beta.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.5</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.5/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.4</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.4/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.3</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.3/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.2</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.2/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.1</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>create-vite@8.1.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/create-vite@8.1.0/packages/create-vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>plugin-legacy@8.1.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/plugin-legacy@8.1.0/packages/plugin-legacy/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>plugin-legacy@8.1.0-beta.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/plugin-legacy@8.1.0-beta.0/packages/plugin-legacy/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.1.0-beta.0</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.1.0-beta.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <h2>v8.0.16</h2> <p>Please refer to <a href="https://github.com/vitejs/vite/blob/v8.0.16/packages/vite/CHANGELOG.md">CHANGELOG.md</a> for details.</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md">vite's changelog</a>.</em></p> <blockquote> <h2><!-- raw HTML omitted --><a href="https://github.com/vitejs/vite/compare/v8.2.0...v8.2.1">8.2.1</a> (2026-08-06)<!-- raw HTML omitted --></h2> <h3>Bug Fixes</h3> <ul> <li><strong>build:</strong> make client chunkImportMap work with <code>sharedPlugins: true</code> (<a href="https://redirect.github.com/vitejs/vite/issues/23184">#23184</a>) (<a href="https://github.com/vitejs/vite/commit/15f03073c915d6ffb9a1fda447ef66b02bf5cde8">15f0307</a>)</li> <li><strong>bundled-dev:</strong> inject client script tag before chunk scripts (<a href="https://redirect.github.com/vitejs/vite/issues/23161">#23161</a>) (<a href="https://github.com/vitejs/vite/commit/eac0cc84aa2472a85a19ee84561c1ba71e381a55">eac0cc8</a>)</li> <li><strong>css:</strong> don't re-run lightningcss visitor during minify (fix <a href="https://redirect.github.com/vitejs/vite/issues/23146">#23146</a>) (<a href="https://redirect.github.com/vitejs/vite/issues/23147">#23147</a>) (<a href="https://github.com/vitejs/vite/commit/de041a79b05a0be965c874592fe2c1505bcd48df">de041a7</a>)</li> <li><strong>deps:</strong> update all non-major dependencies (<a href="https://redirect.github.com/vitejs/vite/issues/23136">#23136</a>) (<a href="https://github.com/vitejs/vite/commit/14454fd8c9a399bc3fdc193e28465b6fcf001e4d">14454fd</a>)</li> <li><strong>deps:</strong> update rolldown-related dependencies (<a href="https://redirect.github.com/vitejs/vite/issues/23070">#23070</a>) (<a href="https://github.com/vitejs/vite/commit/7ac6f7f590747bbdab9958e2c016e3dd04f10542">7ac6f7f</a>)</li> <li>don't mutate the user config when resolving the lib entry from the top-level <code>input</code> (<a href="https://redirect.github.com/vitejs/vite/issues/23135">#23135</a>) (<a href="https://github.com/vitejs/vite/commit/b4bf59686a7ac238929e91a6e1708c739b843a2f">b4bf596</a>)</li> <li>handle shebang ending with uncommon line terminators (<a href="https://redirect.github.com/vitejs/vite/issues/23038">#23038</a>) (<a href="https://github.com/vitejs/vite/commit/17f7b2f193a110d0b47742ad296d182cb4666ce7">17f7b2f</a>)</li> <li><strong>server:</strong> use a random port when port is 0 (<a href="https://redirect.github.com/vitejs/vite/issues/23158">#23158</a>) (<a href="https://github.com/vitejs/vite/commit/fddf4ea41de5f7889037a2f957438857ac12a260">fddf4ea</a>)</li> </ul> <h3>Performance Improvements</h3> <ul> <li><strong>css:</strong> look up pure CSS chunks through a Set (<a href="https://redirect.github.com/vitejs/vite/issues/23114">#23114</a>) (<a href="https://github.com/vitejs/vite/commit/1331b0b438b1e7193effb7d2341660bccb9c3155">1331b0b</a>)</li> </ul> <h3>Documentation</h3> <ul> <li><strong>build:</strong> fix incomplete <code>@default</code> for build.minify (<a href="https://redirect.github.com/vitejs/vite/issues/23177">#23177</a>) (<a href="https://github.com/vitejs/vite/commit/ef02435114c57d0422028f0e6987f3df8db72969">ef02435</a>)</li> </ul> <h3>Miscellaneous Chores</h3> <ul> <li><strong>deps:</strong> update dependency rolldown-plugin-dts to ^0.28.0 (<a href="https://redirect.github.com/vitejs/vite/issues/23137">#23137</a>) (<a href="https://github.com/vitejs/vite/commit/4adc1e7931d4beceb4e236d9a271d057c858a06f">4adc1e7</a>)</li> <li><strong>deps:</strong> update dependency strip-literal to v4 (<a href="https://redirect.github.com/vitejs/vite/issues/23140">#23140</a>) (<a href="https://github.com/vitejs/vite/commit/9db65ce63488ea8f08a3c98dcdc4282b17bd33ff">9db65ce</a>)</li> </ul> <h3>Code Refactoring</h3> <ul> <li><strong>bundled-dev:</strong> avoid injecting server values in the bundle (<a href="https://redirect.github.com/vitejs/vite/issues/22967">#22967</a>) (<a href="https://github.com/vitejs/vite/commit/23b8a088dec9dcc3f1c1353f2074f8644b3cc21f">23b8a08</a>)</li> <li><strong>bundled-dev:</strong> remove rolldown lazy stub module workaround (<a href="https://redirect.github.com/vitejs/vite/issues/23129">#23129</a>) (<a href="https://github.com/vitejs/vite/commit/e72036eed2e28936ed824971b18aeaa3900857f6">e72036e</a>)</li> </ul> <h3>Tests</h3> <ul> <li><strong>bundled-dev:</strong> enable sourcemap playgrounds (<a href="https://redirect.github.com/vitejs/vite/issues/23080">#23080</a>) (<a href="https://github.com/vitejs/vite/commit/c2155fe4d5c8d25fba3a7366d367e3296ae669fa">c2155fe</a>)</li> <li>reduce logs (<a href="https://redirect.github.com/vitejs/vite/issues/23138">#23138</a>) (<a href="https://github.com/vitejs/vite/commit/7673c02e53343ae9356c1f496c1c1da2eb732ac1">7673c02</a>)</li> </ul> <h2><a href="https://github.com/vitejs/vite/compare/v8.2.0-beta.0...v8.2.0">8.2.0</a> (2026-07-30)</h2> <h3>Features</h3> <ul> <li>add <code>input</code> to <code>server.fs.allow</code> (<a href="https://redirect.github.com/vitejs/vite/issues/23035">#23035</a>) (<a href="https://github.com/vitejs/vite/commit/95a3cdab83e1125b03d2e8dd942fb6b64209e5fa">95a3cda</a>)</li> <li><strong>bundled-dev:</strong> reload once after rebuild instead of via the fallback page (<a href="https://redirect.github.com/vitejs/vite/issues/23106">#23106</a>) (<a href="https://github.com/vitejs/vite/commit/b24381d741941b9ce2b1c07db62cc5f4d7bad981">b24381d</a>)</li> <li><strong>bundled-dev:</strong> support worker file update accepted by HMR (<a href="https://redirect.github.com/vitejs/vite/issues/23068">#23068</a>) (<a href="https://github.com/vitejs/vite/commit/0d04351fdc12258c75b9f1cda5780fdb836ed0ef">0d04351</a>)</li> <li><strong>config:</strong> include column in config incompatibility location (<a href="https://redirect.github.com/vitejs/vite/issues/23064">#23064</a>) (<a href="https://github.com/vitejs/vite/commit/8a245726944ed29225920d49be77c33c6e03afc8">8a24572</a>)</li> <li><strong>dev:</strong> resolve interface name for explicit host in network URLs (<a href="https://redirect.github.com/vitejs/vite/issues/22965">#22965</a>) (<a href="https://github.com/vitejs/vite/commit/3ac77d9dd742968961af38a5a91ed6b061ceda7d">3ac77d9</a>)</li> </ul> <h3>Bug Fixes</h3> <ul> <li><strong>bundledDev:</strong> print build errors to the terminal when an HMR update fails (<a href="https://redirect.github.com/vitejs/vite/issues/23024">#23024</a>) (<a href="https://github.com/vitejs/vite/commit/41c465896e8b11b1eb9c5fbdafbdcc528e189a2c">41c4658</a>)</li> <li><strong>deps:</strong> update all non-major dependencies (<a href="https://redirect.github.com/vitejs/vite/issues/23069">#23069</a>) (<a href="https://github.com/vitejs/vite/commit/4c07b74416f859d7e8bdace13409ef2d080edf76">4c07b74</a>)</li> <li><strong>hmr:</strong> preserve environment snapshot during server restart (<a href="https://redirect.github.com/vitejs/vite/issues/22992">#22992</a>) (<a href="https://github.com/vitejs/vite/commit/b1186c36d06bb94941c58e8272fc4acb8512c93b">b1186c3</a>)</li> <li><strong>importAnalysis:</strong> interop imports injected into optimized dep files by plugins (<a href="https://redirect.github.com/vitejs/vite/issues/23029">#23029</a>) (<a href="https://github.com/vitejs/vite/commit/8c2a87d41fb24536e59643351758084cde4d0dd7">8c2a87d</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/vitejs/vite/commit/421615865dad3ed39137d17281814fc78a41246c"><code>4216158</code></a> release: v8.2.1</li> <li><a href="https://github.com/vitejs/vite/commit/fddf4ea41de5f7889037a2f957438857ac12a260"><code>fddf4ea</code></a> fix(server): use a random port when port is 0 (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23158">#23158</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/de041a79b05a0be965c874592fe2c1505bcd48df"><code>de041a7</code></a> fix(css): don't re-run lightningcss visitor during minify (fix <a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23146">#23146</a>) (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23147">#23147</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/15f03073c915d6ffb9a1fda447ef66b02bf5cde8"><code>15f0307</code></a> fix(build): make client chunkImportMap work with <code>sharedPlugins: true</code> (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23184">#23184</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/c2155fe4d5c8d25fba3a7366d367e3296ae669fa"><code>c2155fe</code></a> test(bundled-dev): enable sourcemap playgrounds (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23080">#23080</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/ef02435114c57d0422028f0e6987f3df8db72969"><code>ef02435</code></a> docs(build): fix incomplete <code>@default</code> for build.minify (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23177">#23177</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/eac0cc84aa2472a85a19ee84561c1ba71e381a55"><code>eac0cc8</code></a> fix(bundled-dev): inject client script tag before chunk scripts (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23161">#23161</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/23b8a088dec9dcc3f1c1353f2074f8644b3cc21f"><code>23b8a08</code></a> refactor(bundled-dev): avoid injecting server values in the bundle (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22967">#22967</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/e72036eed2e28936ed824971b18aeaa3900857f6"><code>e72036e</code></a> refactor(bundled-dev): remove rolldown lazy stub module workaround (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23129">#23129</a>)</li> <li><a href="https://github.com/vitejs/vite/commit/14454fd8c9a399bc3fdc193e28465b6fcf001e4d"><code>14454fd</code></a> fix(deps): update all non-major dependencies (<a href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/23136">#23136</a>)</li> <li>Additional commits viewable in <a href="https://github.com/vitejs/vite/commits/v8.2.1/packages/vite">compare view</a></li> </ul> </details> <br /> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HarelM <harel.mazor@gmail.com>
This commit is contained in:
@@ -2,9 +2,13 @@
|
||||
|
||||
### ✨ Features and improvements
|
||||
- Replace Cypress with Playwright for end-to-end tests and Vitest browser mode (Playwright provider) for component tests; drop the `@shellygo/cypress-test-utils` helper in favour of a `MaputnikDriver` page object
|
||||
- Upgrade to MapLibre GL JS 6 and Vite 8, and update the remaining dependencies
|
||||
- Serve the RTL text plugin from `@mapbox/mapbox-gl-rtl-text` instead of a pinned CDN URL, so its version is tracked in `package.json`
|
||||
- Exported HTML now loads MapLibre GL JS as an ES module, since v6 no longer ships a UMD bundle
|
||||
- _...Add new stuff here..._
|
||||
|
||||
### 🐞 Bug fixes
|
||||
- The map's data listener now fires on tile loads again, so source and vector layer field autocompletion is populated
|
||||
- _...Add new stuff here..._
|
||||
|
||||
## 3.1.0
|
||||
|
||||
@@ -14,6 +14,7 @@ export default defineConfig({
|
||||
files: ["**/*.{js,jsx,ts,tsx}"],
|
||||
ignores: [
|
||||
"dist/**/*",
|
||||
"public/**/*",
|
||||
],
|
||||
languageOptions: {
|
||||
ecmaVersion: 2024,
|
||||
|
||||
Generated
+917
-1383
File diff suppressed because it is too large
Load Diff
+19
-18
@@ -5,10 +5,11 @@
|
||||
"type": "module",
|
||||
"main": "''",
|
||||
"scripts": {
|
||||
"start": "vite",
|
||||
"build": "tsc && vite build --mode=production",
|
||||
"build-desktop": "tsc && vite build --mode=desktop && cd desktop && make",
|
||||
"build-linux": "tsc && vite build --mode=desktop && cd desktop && make bin/linux/maputnik",
|
||||
"copy-rtl-text-plugin": "mkdir -p public && cp -p node_modules/@mapbox/mapbox-gl-rtl-text/dist/mapbox-gl-rtl-text.js public/",
|
||||
"start": "npm run copy-rtl-text-plugin && vite",
|
||||
"build": "npm run copy-rtl-text-plugin && tsc && vite build --mode=production",
|
||||
"build-desktop": "npm run copy-rtl-text-plugin && tsc && vite build --mode=desktop && cd desktop && make",
|
||||
"build-linux": "npm run copy-rtl-text-plugin && tsc && vite build --mode=desktop && cd desktop && make bin/linux/maputnik",
|
||||
"i18n:extract": "npx i18next-cli extract",
|
||||
"lint": "eslint",
|
||||
"test": "playwright test",
|
||||
@@ -30,7 +31,7 @@
|
||||
"@codemirror/lint": "^6.9.7",
|
||||
"@codemirror/state": "^6.7.1",
|
||||
"@codemirror/theme-one-dark": "^6.1.3",
|
||||
"@codemirror/view": "^6.43.8",
|
||||
"@codemirror/view": "^6.43.9",
|
||||
"@dnd-kit/core": "^6.3.1",
|
||||
"@dnd-kit/sortable": "^10.0.0",
|
||||
"@dnd-kit/utilities": "^3.2.2",
|
||||
@@ -59,20 +60,20 @@
|
||||
"lodash.get": "^4.4.2",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"maplibre-gl": "^5.24.0",
|
||||
"maplibre-gl": "^6.4.1",
|
||||
"maputnik-design": "github:maputnik/design#172b06c",
|
||||
"ol": "^10.10.0",
|
||||
"ol-mapbox-style": "^13.4.2",
|
||||
"pmtiles": "^4.5.0",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^19.2.7",
|
||||
"react": "^19.2.8",
|
||||
"react-accessible-accordion": "^5.0.1",
|
||||
"react-aria-menubutton": "^8.0.0",
|
||||
"react-aria-modal": "^5.0.2",
|
||||
"react-collapse": "^5.1.1",
|
||||
"react-color": "^2.19.3",
|
||||
"react-dom": "^19.2.7",
|
||||
"react-i18next": "^17.0.8",
|
||||
"react-dom": "^19.2.8",
|
||||
"react-i18next": "^17.0.11",
|
||||
"react-icons": "^5.7.0",
|
||||
"react-markdown": "^10.1.0",
|
||||
"reconnecting-websocket": "^4.4.0",
|
||||
@@ -115,22 +116,22 @@
|
||||
"@types/lodash.isequal": "^4.5.8",
|
||||
"@types/lodash.throttle": "^4.1.9",
|
||||
"@types/randomcolor": "^0.5.9",
|
||||
"@types/react": "^19.2.17",
|
||||
"@types/react": "^19.2.18",
|
||||
"@types/react-aria-menubutton": "^6.2.14",
|
||||
"@types/react-aria-modal": "^5.0.0",
|
||||
"@types/react-collapse": "^5.0.4",
|
||||
"@types/react-color": "^3.0.13",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"@types/react-dom": "^19.2.4",
|
||||
"@types/string-hash": "^1.1.3",
|
||||
"@types/wicg-file-system-access": "^2023.10.7",
|
||||
"@vitejs/plugin-react": "5.2",
|
||||
"@vitest/coverage-v8": "^4.1.10",
|
||||
"@vitejs/plugin-react": "^6.0.5",
|
||||
"@vitest/coverage-v8": "^4.1.11",
|
||||
"cors": "^2.8.6",
|
||||
"eslint": "^10.8.1",
|
||||
"eslint-plugin-react": "^7.37.5",
|
||||
"eslint-plugin-react-hooks": "^7.1.1",
|
||||
"eslint-plugin-react-refresh": "^0.5.3",
|
||||
"i18next-cli": "^1.69.0",
|
||||
"eslint-plugin-react-refresh": "^0.5.4",
|
||||
"i18next-cli": "^1.71.0",
|
||||
"istanbul": "^0.4.5",
|
||||
"istanbul-lib-coverage": "^3.2.2",
|
||||
"nyc": "^18.0.0",
|
||||
@@ -142,9 +143,9 @@
|
||||
"stylelint-scss": "^7.2.0",
|
||||
"typescript": "^6.0.3",
|
||||
"typescript-eslint": "^8.67.0",
|
||||
"uuid": "^14.0.1",
|
||||
"vite": "^7.3.2",
|
||||
"uuid": "^14.0.2",
|
||||
"vite": "^8.2.1",
|
||||
"vite-plugin-istanbul": "^9.0.1",
|
||||
"vitest": "^4.1.10"
|
||||
"vitest": "^4.1.11"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import React from "react";
|
||||
import Color from "color";
|
||||
import ChromePicker from "react-color/lib/components/chrome/Chrome";
|
||||
import {type ColorResult} from "react-color";
|
||||
import {ChromePicker, type ColorResult} from "react-color";
|
||||
import lodash from "lodash";
|
||||
|
||||
function formatColor(color: ColorResult): string {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React from "react";
|
||||
import {createRoot} from "react-dom/client";
|
||||
import MapLibreGl, {type LayerSpecification, type LngLat, type Map, type MapOptions, type SourceSpecification, type StyleSpecification} from "maplibre-gl";
|
||||
import * as MapLibreGl from "maplibre-gl";
|
||||
import {type LayerSpecification, type LngLat, type Map, type MapOptions, type SourceSpecification, type StyleSpecification} from "maplibre-gl";
|
||||
import MaplibreInspect from "@maplibre/maplibre-gl-inspect";
|
||||
import colors from "@maplibre/maplibre-gl-inspect/lib/colors";
|
||||
import { FeatureLayerPopup as MapMaplibreGlLayerPopup } from "./MapMaplibreGlLayerPopup";
|
||||
@@ -10,7 +11,7 @@ import { ZoomControl } from "../libs/zoomcontrol";
|
||||
import { type HighlightedLayer, colorHighlightedLayer } from "../libs/highlight";
|
||||
import "maplibre-gl/dist/maplibre-gl.css";
|
||||
import "../maplibregl.css";
|
||||
import "../libs/maplibre-rtl";
|
||||
import "../libs/maplibre-init";
|
||||
import MaplibreGeocoder, { type MaplibreGeocoderApi, type MaplibreGeocoderApiConfig } from "@maplibre/maplibre-gl-geocoder";
|
||||
import "@maplibre/maplibre-gl-geocoder/dist/maplibre-gl-geocoder.css";
|
||||
import { withTranslation, type WithTranslation } from "react-i18next";
|
||||
@@ -238,7 +239,7 @@ class MapMaplibreGlInternal extends React.Component<MapMaplibreGlInternalProps,
|
||||
});
|
||||
|
||||
map.on("data", e => {
|
||||
if(e.dataType !== "tile") return;
|
||||
if(e.dataType !== "source" || !e.tile) return;
|
||||
this.props.onDataChange!({
|
||||
map: this.state.map
|
||||
});
|
||||
|
||||
@@ -59,7 +59,6 @@ class ModalExportInternal extends React.Component<ModalExportInternalProps> {
|
||||
<meta charset="utf-8" />
|
||||
<title>${htmlTitle}</title>
|
||||
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
|
||||
<script src="https://unpkg.com/maplibre-gl@${MAPLIBRE_GL_VERSION}/dist/maplibre-gl.js"></script>
|
||||
<link href="https://unpkg.com/maplibre-gl@${MAPLIBRE_GL_VERSION}/dist/maplibre-gl.css" rel="stylesheet" />
|
||||
<style>
|
||||
body { margin: 0; padding: 0; }
|
||||
@@ -68,8 +67,9 @@ class ModalExportInternal extends React.Component<ModalExportInternalProps> {
|
||||
</head>
|
||||
<body>
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
const map = new maplibregl.Map({
|
||||
<script type="module">
|
||||
import {Map} from 'https://unpkg.com/maplibre-gl@${MAPLIBRE_GL_VERSION}/dist/maplibre-gl.mjs';
|
||||
const map = new Map({
|
||||
container: 'map',
|
||||
style: ${tokenStyle},
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
import { setRTLTextPlugin, setWorkerUrl } from "maplibre-gl";
|
||||
import workerUrl from "maplibre-gl/dist/maplibre-gl-worker.mjs?worker&url";
|
||||
|
||||
setWorkerUrl(workerUrl);
|
||||
setRTLTextPlugin(`${import.meta.env.BASE_URL}mapbox-gl-rtl-text.js`, false);
|
||||
@@ -1,3 +0,0 @@
|
||||
import MapLibreGl from "maplibre-gl";
|
||||
|
||||
MapLibreGl.setRTLTextPlugin("https://unpkg.com/@mapbox/mapbox-gl-rtl-text@0.2.3/mapbox-gl-rtl-text.min.js", false);
|
||||
@@ -32,8 +32,6 @@ export class ZoomControl {
|
||||
|
||||
addEventListeners (){
|
||||
this._map!.on("render", () => this.updateZoomLevel());
|
||||
this._map!.on("zoomIn", () => this.updateZoomLevel());
|
||||
this._map!.on("zoomOut", () => this.updateZoomLevel());
|
||||
}
|
||||
|
||||
onRemove() {
|
||||
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
// SPACE HELPER
|
||||
.maputnik-space {
|
||||
@include mixins.vendor-prefix(flex-grow, 1);
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
// MESSAGE PANEL
|
||||
|
||||
@@ -101,8 +101,7 @@
|
||||
.maputnik-select {
|
||||
@extend .maputnik-input !optional; /* stylelint-disable-line */
|
||||
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
background: vars.$color-gray url("#{vars.$icon-down-arrow}") right center no-repeat;
|
||||
color: vars.$color-white;
|
||||
background-position: calc(100% - 2px) center;
|
||||
|
||||
@@ -74,7 +74,6 @@
|
||||
line-height: 1.3;
|
||||
max-height: 50px;
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 600ms, visibility 600ms;
|
||||
transition: opacity 600ms, visibility 600ms;
|
||||
|
||||
&:focus-within {
|
||||
|
||||
+2
-14
@@ -1,21 +1,9 @@
|
||||
@mixin vendor-prefix($name, $argument) {
|
||||
-webkit-#{$name}: #{$argument};
|
||||
-ms-#{$name}: #{$argument};
|
||||
-moz-#{$name}: #{$argument};
|
||||
-o-#{$name}: #{$argument};
|
||||
#{$name}: #{$argument};
|
||||
}
|
||||
|
||||
@mixin flex-row {
|
||||
display: flex;
|
||||
display: -ms-flexbox;
|
||||
|
||||
@include vendor-prefix(flex-direction, row);
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
@mixin flex-column {
|
||||
display: flex;
|
||||
display: -ms-flexbox;
|
||||
|
||||
@include vendor-prefix(flex-direction, column);
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
||||
background-color: #666;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||
"types": ["geojson", "@types/wicg-file-system-access", "node"],
|
||||
"types": ["geojson", "@types/wicg-file-system-access", "node", "vite/client"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
|
||||
|
||||
+8
-2
@@ -7,7 +7,10 @@ export default defineConfig(({ mode }) => ({
|
||||
port: 8888,
|
||||
},
|
||||
build: {
|
||||
sourcemap: true
|
||||
sourcemap: true,
|
||||
rolldownOptions: {
|
||||
checks: { invalidAnnotation: false },
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
react(),
|
||||
@@ -17,8 +20,11 @@ export default defineConfig(({ mode }) => ({
|
||||
forceBuildInstrument: true, // Instrument the source so e2e runs can collect coverage
|
||||
}),
|
||||
],
|
||||
optimizeDeps: {
|
||||
exclude: ["maplibre-gl/dist/maplibre-gl-worker.mjs"],
|
||||
},
|
||||
base: mode === "desktop" ? "/" : "/maputnik/",
|
||||
define: {
|
||||
global: "window"
|
||||
global: "globalThis"
|
||||
},
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user