Compare commits

..

1 Commits

Author SHA1 Message Date
dependabot[bot] b7f7d6b9c3 chore(deps-dev): Bump typescript from 5.9.3 to 6.0.2
Bumps [typescript](https://github.com/microsoft/TypeScript) from 5.9.3 to 6.0.2.
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.9.3...v6.0.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 6.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-30 15:08:17 +00:00
34 changed files with 941 additions and 1297 deletions
-3
View File
@@ -15,9 +15,6 @@ updates:
vitest:
patterns:
- "*vitest*"
react:
patterns:
- "*react*"
cooldown:
default-days: 5
semver-major-days: 5
+1 -1
View File
@@ -11,7 +11,7 @@ jobs:
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98 # v3.1.0
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2.5.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve Dependabot PRs
+20 -20
View File
@@ -21,9 +21,9 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: { persist-credentials: false }
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- run: npm ci
@@ -41,22 +41,22 @@ jobs:
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: { persist-credentials: false }
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run build
- name: artifacts/maputnik
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: maputnik
path: dist
# Build and upload desktop CLI artifacts
- name: Set up Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ^1.23.x
cache-dependency-path: desktop/go.sum
@@ -66,19 +66,19 @@ jobs:
run: npm run build-desktop
- name: Artifacts/linux
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: maputnik-linux
path: ./desktop/bin/linux/
- name: Artifacts/darwin
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: maputnik-darwin
path: ./desktop/bin/darwin/
- name: Artifacts/windows
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: maputnik-windows
path: ./desktop/bin/windows/
@@ -90,15 +90,15 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: { persist-credentials: false }
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- run: npm ci
- run: npm run test-unit-ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
with:
files: ${{ github.workspace }}/coverage/coverage-final.json
verbose: true
@@ -111,20 +111,20 @@ jobs:
contents: read
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: { persist-credentials: false }
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- run: npm ci
- name: Cypress run
uses: cypress-io/github-action@fa4a118725a8f001170d49631ea89e5d66fee626 # v7.4.1
uses: cypress-io/github-action@4c06c48f3ffea349b7189aa06dfcda47a9fa7b92 # v7.1.8
with:
build: npm run build
start: npm run start
browser: chrome
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
with:
files: ${{ github.workspace }}/.nyc_output/out.json
verbose: true
@@ -135,20 +135,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: { persist-credentials: false }
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
- run: npm ci
- name: Cypress run
uses: cypress-io/github-action@fa4a118725a8f001170d49631ea89e5d66fee626 # v7.4.1
uses: cypress-io/github-action@4c06c48f3ffea349b7189aa06dfcda47a9fa7b92 # v7.1.8
with:
build: docker build -t maputnik .
start: docker run --rm --network host maputnik --port=8888
browser: chrome
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
uses: codecov/codecov-action@1af58845a975a7985b0beb0cbe6fbbb71a41dbad # v5.5.3
with:
files: ${{ github.workspace }}/.nyc_output/out.json
verbose: true
+4 -4
View File
@@ -38,11 +38,11 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
# ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -67,4 +67,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
+3 -3
View File
@@ -16,13 +16,13 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: main
- name: Use Node.js from nvmrc
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
@@ -32,7 +32,7 @@ jobs:
./build/bump-version-changelog.js ${{ inputs.version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
commit-message: Bump version to ${{ inputs.version }}
branch: bump-version-to-${{ inputs.version }}
+5 -5
View File
@@ -12,11 +12,11 @@ jobs:
contents: write
if: ${{ github.event_name == 'push' }}
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: { persist-credentials: false }
- name: Use Node.js from nvmrc
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: '.nvmrc'
@@ -27,7 +27,7 @@ jobs:
run: npm run build
- name: Upload to GitHub Pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: dist
@@ -45,11 +45,11 @@ jobs:
steps:
- name: Login to GitHub Container Registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: docker build -t ghcr.io/maplibre/maputnik:main .
- run: docker push ghcr.io/maplibre/maputnik:main
+6 -6
View File
@@ -15,14 +15,14 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: main
persist-credentials: false
- name: Use Node.js from nvmrc
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
@@ -42,19 +42,19 @@ jobs:
run:
shell: bash
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: main
- name: Use Node.js from nvmrc
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
with:
node-version-file: ".nvmrc"
registry-url: "https://registry.npmjs.org"
- name: Set up Go for desktop build
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version: ^1.23.x
cache-dependency-path: desktop/go.sum
@@ -91,7 +91,7 @@ jobs:
- name: Create GitHub Release
id: create_regular_release
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
+4 -11
View File
@@ -1,13 +1,5 @@
## main
### ✨ Features and improvements
- _...Add new stuff here..._
### 🐞 Bug fixes
- _...Add new stuff here..._
## 3.1.0
### ✨ Features and improvements
- Added translation to "Links" in debug modal
- Add support for hillshade's color arrays and relief-color elevation expression
@@ -22,20 +14,21 @@
- Add support for sprite object in setting modal
- Set the correct map view when opening a new style on an empty map
- Allow root-relative urls in the stylefile
- _...Add new stuff here..._
### 🐞 Bug fixes
- Improved the local style open modal and local file upload.
- Fixed the Expression editor (for long expressions) being able to be float under other components further down
- Fixed an issue when clicking on a popup and then clicking on the map again
- Fix modal close button position
- Fixed an issue with the generation of translations
- Fix modal close button possition
- Fixed an issue with the generation of tranlations
- Fix missing spec info when clicking next to a property
- Fix Firefox open file that stopped working due to react upgrade
- Fix issue with missing bottom error panel
- Fixed headers in left panes (Layers list and Layer editor) to remain visible when scrolling
- Fix error when using a source from localhost
- Fix an issue with scrolling when using the code editor
- _...Add new stuff here..._
## 3.0.0
-6
View File
@@ -43,12 +43,6 @@ export default class MaputnikCypressHelper {
}
});
},
dropFileByFixture: (fixture: string, dropzoneTestId: string) => {
this.helper.get.elementByTestId(dropzoneTestId).selectFile("cypress/fixtures/" + fixture, {
action: "drag-drop",
force: true,
});
},
...this.helper.when,
};
+1 -6
View File
@@ -143,12 +143,7 @@ export class MaputnikDriver {
},
chooseExampleFile: () => {
this.helper.given.fixture("example-style.json", "example-style.json");
this.helper.when.openFileByFixture("example-style.json", "modal:open.dropzone", "modal:open.file.input");
this.helper.when.wait(200);
},
dropExampleFile: () => {
this.helper.given.fixture("example-style.json", "example-style.json");
this.helper.when.dropFileByFixture("example-style.json", "modal:open.dropzone");
this.helper.when.openFileByFixture("example-style.json", "modal:open.file.button", "modal:open.file.input");
this.helper.when.wait(200);
},
setStyle: (
+1 -1
View File
@@ -7,7 +7,7 @@ export default class ModalDriver {
public when = {
fillLayers: (opts: { type: string; layer?: string; id?: string }) => {
// Having logic in test code is an anti pattern.
// This should be split to multiple single responsibility functions
// This should be splitted to multiple single responsibility functions
const type = opts.type;
const layer = opts.layer;
let id;
+1 -6
View File
@@ -23,11 +23,6 @@ describe("modals", () => {
then(get.fixture("example-style.json")).shouldEqualToStoredStyle();
});
it("upload via drag and drop", () => {
when.dropExampleFile();
then(get.fixture("example-style.json")).shouldEqualToStoredStyle();
});
describe("when click open url", () => {
beforeEach(() => {
const styleFileUrl = get.exampleFileUrl();
@@ -288,7 +283,7 @@ describe("modals", () => {
it("include API key when change renderer", () => {
it("inlcude API key when change renderer", () => {
when.click("modal:settings.close-modal");
when.click("nav:open");
+1 -1
View File
@@ -1,7 +1,7 @@
import { defineConfig } from "i18next-cli";
export default defineConfig({
locales: ["de", "fr", "he", "it", "ja", "ko", "tr", "zh"],
locales: ["de", "fr", "he", "it", "ja", "ko", "zh"],
extract: {
input: ["src/**/*.{js,jsx,ts,tsx}"],
output: "src/locales/{{language}}/{{namespace}}.json",
+835 -855
View File
File diff suppressed because it is too large Load Diff
+30 -30
View File
@@ -1,6 +1,6 @@
{
"name": "maputnik",
"version": "3.1.0",
"version": "3.0.0",
"description": "A MapLibre GL visual style editor",
"type": "module",
"main": "''",
@@ -27,43 +27,43 @@
"homepage": "https://github.com/maplibre/maputnik#readme",
"dependencies": {
"@codemirror/lang-json": "^6.0.2",
"@codemirror/lint": "^6.9.7",
"@codemirror/state": "^6.7.0",
"@codemirror/lint": "^6.9.5",
"@codemirror/state": "^6.6.0",
"@codemirror/theme-one-dark": "^6.1.3",
"@codemirror/view": "^6.43.4",
"@codemirror/view": "^6.40.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@mapbox/mapbox-gl-rtl-text": "^0.4.0",
"@maplibre/maplibre-gl-geocoder": "^1.9.4",
"@maplibre/maplibre-gl-inspect": "^1.8.2",
"@maplibre/maplibre-gl-style-spec": "^25.0.1",
"@maplibre/maplibre-gl-style-spec": "^24.7.0",
"array-move": "^4.0.0",
"buffer": "^6.0.3",
"classnames": "^2.5.1",
"codemirror": "^6.0.2",
"color": "^5.0.3",
"detect-browser": "^5.3.0",
"downshift": "^9.4.0",
"downshift": "^9.3.2",
"events": "^3.3.0",
"file-saver": "^2.0.5",
"i18next": "^26.3.4",
"i18next": "^25.10.9",
"i18next-browser-languagedetector": "^8.2.1",
"i18next-resources-to-backend": "^1.2.1",
"json-stringify-pretty-compact": "^4.0.0",
"json-to-ast": "^2.1.0",
"lodash": "^4.18.1",
"lodash": "^4.17.23",
"lodash.capitalize": "^4.2.1",
"lodash.clamp": "^4.0.3",
"lodash.clonedeep": "^4.5.0",
"lodash.get": "^4.4.2",
"lodash.isequal": "^4.5.0",
"lodash.throttle": "^4.1.1",
"maplibre-gl": "^5.24.0",
"maplibre-gl": "^5.21.0",
"maputnik-design": "github:maputnik/design#172b06c",
"ol": "^10.9.0",
"ol-mapbox-style": "^13.4.1",
"pmtiles": "^4.4.1",
"ol": "^10.8.0",
"ol-mapbox-style": "^13.4.0",
"pmtiles": "^4.4.0",
"prop-types": "^15.8.1",
"react": "^19.2.4",
"react-accessible-accordion": "^5.0.1",
@@ -72,11 +72,11 @@
"react-collapse": "^5.1.1",
"react-color": "^2.19.3",
"react-dom": "^19.2.4",
"react-i18next": "^17.0.7",
"react-i18next": "^16.6.6",
"react-icons": "^5.6.0",
"react-markdown": "^10.1.0",
"reconnecting-websocket": "^4.4.0",
"slugify": "^1.6.9",
"slugify": "^1.6.8",
"string-hash": "^1.1.3",
"url": "^0.11.4"
},
@@ -126,28 +126,28 @@
"@types/string-hash": "^1.1.3",
"@types/wicg-file-system-access": "^2023.10.7",
"@vitejs/plugin-react": "^5.1.4",
"@vitest/coverage-v8": "^4.1.9",
"@vitest/coverage-v8": "^4.1.2",
"cors": "^2.8.6",
"cypress": "^15.18.0",
"cypress": "^15.13.0",
"cypress-plugin-tab": "^2.0.0",
"eslint": "^10.6.0",
"eslint": "^10.1.0",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2",
"i18next-cli": "^1.53.2",
"i18next-cli": "^1.51.3",
"istanbul": "^0.4.5",
"istanbul-lib-coverage": "^3.2.2",
"postcss": "^8.5.16",
"postcss": "^8.5.8",
"react-hot-loader": "^4.13.1",
"sass": "^1.101.0",
"stylelint": "^17.14.0",
"stylelint-config-recommended-scss": "^17.0.1",
"stylelint-scss": "^7.2.0",
"typescript": "^6.0.3",
"typescript-eslint": "^8.62.1",
"uuid": "^14.0.1",
"vite": "^7.3.2",
"vite-plugin-istanbul": "^9.0.1",
"vitest": "^4.1.9"
"sass": "^1.98.0",
"stylelint": "^17.6.0",
"stylelint-config-recommended-scss": "^17.0.0",
"stylelint-scss": "^7.0.0",
"typescript": "^6.0.2",
"typescript-eslint": "^8.57.2",
"uuid": "^13.0.0",
"vite": "^7.3.1",
"vite-plugin-istanbul": "^8.0.0",
"vitest": "^4.1.2"
}
}
+1 -1
View File
@@ -450,7 +450,7 @@ export default class App extends React.Component<any, AppState> {
if (message) {
try {
const objPath = message.split(":")[0];
// Errors can be deeply nested for example 'layers[0].filter[1][1][0]' we only care upto the property 'layers[0].filter'
// Errors can be deply nested for example 'layers[0].filter[1][1][0]' we only care upto the property 'layers[0].filter'
const unsetPath = objPath.match(/^\S+?\[\d+\]\.[^[]+/)![0];
unset(dirtyMapStyle, unsetPath);
}
+1 -1
View File
@@ -57,7 +57,7 @@ class FeatureLayerPopup extends React.Component<FeatureLayerPopupProps> {
// Default color
return "black";
}
// This is quite complex, just in case there's an edgecase we're missing
// This is quite complex, just incase there's an edgecase we're missing
// always return black if we get an unexpected error.
catch (err) {
console.warn("Unable to get feature color, error:", err);
+1 -1
View File
@@ -21,7 +21,7 @@ import { type MappedLayerErrors } from "../libs/definitions";
function setStopRefs(props: DataPropertyInternalProps, state: DataPropertyState) {
// This is initialised below only if required to improved performance.
// This is initialsed below only if required to improved performance.
let newRefs: {[key: number]: string} | undefined;
if(props.value && props.value.stops) {
+1 -1
View File
@@ -24,7 +24,7 @@ import { type MappedLayerErrors } from "../libs/definitions";
* When the stops are reordered the references are also updated (see this.orderStops) this allows React to use the same key for the element and keep keyboard focus.
*/
function setStopRefs(props: ZoomPropertyInternalProps, state: ZoomPropertyState) {
// This is initialised below only if required to improved performance.
// This is initialsed below only if required to improved performance.
let newRefs: {[key: number]: string} = {};
if(props.value && (props.value as ZoomWithStops).stops) {
+16 -69
View File
@@ -1,4 +1,4 @@
import React, { type DragEvent, type FormEvent } from "react";
import React, { type FormEvent } from "react";
import { MdFileUpload } from "react-icons/md";
import { MdAddCircleOutline } from "react-icons/md";
import { Trans, type WithTranslation, withTranslation } from "react-i18next";
@@ -51,20 +51,16 @@ type ModalOpenInternalProps = {
type ModalOpenState = {
styleUrl: string
isDragOver: boolean
error?: string | null
activeRequest?: any
activeRequestUrl?: string | null
};
class ModalOpenInternal extends React.Component<ModalOpenInternalProps, ModalOpenState> {
private fileInputRef = React.createRef<HTMLInputElement>();
constructor(props: ModalOpenInternalProps) {
super(props);
this.state = {
styleUrl: "",
isDragOver: false,
styleUrl: ""
};
}
@@ -202,45 +198,12 @@ class ModalOpenInternal extends React.Component<ModalOpenInternalProps, ModalOpe
onOpenToggle() {
this.setState({
styleUrl: "",
isDragOver: false,
styleUrl: ""
});
this.clearError();
this.props.onOpenToggle();
}
onBrowseClick = async () => {
if (typeof window.showOpenFilePicker === "function") {
await this.onOpenFile();
return;
}
this.fileInputRef.current?.click();
};
onFileDragOver = (e: DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
if (!this.state.isDragOver) {
this.setState({ isDragOver: true });
}
};
onFileDragLeave = (e: DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
this.setState({ isDragOver: false });
};
onFileDrop = (e: DragEvent<HTMLDivElement>) => {
e.preventDefault();
e.stopPropagation();
this.setState({ isDragOver: false });
this.onFileChanged(e.dataTransfer.files);
};
onChangeUrl = (url: string) => {
this.setState({
styleUrl: url,
@@ -281,35 +244,19 @@ class ModalOpenInternal extends React.Component<ModalOpenInternalProps, ModalOpe
<section className="maputnik-modal-section">
<h1>{t("Open local Style")}</h1>
<p>{t("Open a local JSON style from your computer.")}</p>
<div
data-wd-key="modal:open.dropzone"
className={`maputnik-upload-dropzone${this.state.isDragOver ? " maputnik-upload-dropzone--active" : ""}`}
role="button"
tabIndex={0}
onDragOver={this.onFileDragOver}
onDragLeave={this.onFileDragLeave}
onDrop={this.onFileDrop}
onClick={() => void this.onBrowseClick()}
onKeyDown={(e) => {
if (e.key === "Enter" || e.key === " ") {
e.preventDefault();
void this.onBrowseClick();
}
}}
>
<div className="maputnik-upload-dropzone-content">
<MdFileUpload className="maputnik-upload-dropzone-icon" aria-hidden="true" />
<p className="maputnik-upload-dropzone-text">
{t("Drag and drop a style JSON file here or click to browse")}
</p>
</div>
<input
ref={this.fileInputRef}
data-wd-key="modal:open.file.input"
type="file"
style={{ display: "none" }}
onChange={(e) => this.onFileChanged(e.target.files)}
/>
<div>
{typeof window.showOpenFilePicker === "function" ? (
<InputButton
data-wd-key="modal:open.file.button"
className="maputnik-big-button"
onClick={this.onOpenFile}><MdFileUpload /> {t("Open Style")}
</InputButton>
) : (
<label>
<a className="maputnik-button maputnik-upload-button" aria-label={t("Open Style")}><MdFileUpload /> {t("Open Style")}</a>
<input data-wd-key="modal:open.file.input" type="file" style={{ display: "none" }} onChange={(e) => this.onFileChanged(e.target.files)} />
</label>
)}
</div>
</section>
-1
View File
@@ -11,7 +11,6 @@ export const supportedLanguages = {
"it": "Italiano",
"ja": "日本語",
"ko": "한국어",
"tr": "Türkçe",
"zh": "简体中文"
} as const;
+1 -1
View File
@@ -25,7 +25,7 @@ export default class LayerWatcher {
// Since we scan over all features we want to avoid this as much as
// possible and only do it after a batch of data has loaded because
// we only care eventually about knowing the fields in the vector layers
// we only care eventuall about knowing the fields in the vector layers
this.throttledAnalyzeVectorLayerFields = throttle(this.analyzeVectorLayerFields, 5000);
}
-1
View File
@@ -54,7 +54,6 @@ The following users can help you with the relevant languages:
| ja | Japanese | [@keichan34](https://github.com/keichan34) |
| ko | Korean | [@jinifor](https://github.com/jinifor) |
| zh | Simplified Chinese | [@jieme](https://github.com/jieme) |
| tr | Turkish | [@mcihad](https://github.com/mcihad) |
You can test the UI in different languages using the dropdown in the top menu
Note that Maputnik automatically localize based on browser language settings and stores this language in local storage.
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "Video-URL",
"View": "Ansicht",
"You've entered an old style filter.": "Du hast einen alten Filter-Stil eingegeben.",
"Zoom": "Zoom",
"Drag and drop a style JSON file here or click to browse": "Ziehen Sie eine Style-JSON-Datei hierher oder klicken Sie, um zu durchsuchen"
"Zoom": "Zoom"
}
-3
View File
@@ -1,3 +0,0 @@
{
"Drag and drop a style JSON file here or click to browse": "Drag and drop a style JSON file here or click to browse"
}
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "URL de la vidéo",
"View": "Vue",
"You've entered an old style filter.": "Vous avez entré un ancien style de filtre.",
"Zoom": "Zoom",
"Drag and drop a style JSON file here or click to browse": "Faites glisser un fichier JSON de style ici ou cliquez pour parcourir"
"Zoom": "Zoom"
}
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "כתובת וידאו",
"View": "תצוגה",
"You've entered an old style filter.": "הכנסתם סינון מסוג ישן,",
"Zoom": "זום",
"Drag and drop a style JSON file here or click to browse": "גרור ושחרר כאן קובץ JSON של סגנון או לחץ כדי לעיין"
"Zoom": "זום"
}
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "Indirizzo video",
"View": "Vista",
"You've entered an old style filter.": "Hai inserito uno stile filtro obsoleto.",
"Zoom": "Zoom",
"Drag and drop a style JSON file here or click to browse": "Trascina e rilascia qui un file JSON dello stile o fai clic per sfogliare"
"Zoom": "Zoom"
}
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "動画URL",
"View": "表示",
"You've entered an old style filter.": "旧型フィルタを使用しております。",
"Zoom": "ズーム",
"Drag and drop a style JSON file here or click to browse": "ここにスタイルのJSONファイルをドラッグ&ドロップするか、クリックして参照してください"
"Zoom": "ズーム"
}
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "비디오 URL",
"View": "보기",
"You've entered an old style filter.": "이전 스타일 필터를 입력했습니다.",
"Zoom": "줌",
"Drag and drop a style JSON file here or click to browse": "여기에 스타일 JSON 파일을 끌어다 놓거나 클릭하여 찾아보세요"
"Zoom": "줌"
}
-204
View File
@@ -1,204 +0,0 @@
{
"<0>Open in OSM</0>. Opens the current view on openstreetmap.org": "<0>OSM'de aç</0>. Mevcut görünümü openstreetmap.org üzerinde açar",
"Achromatopsia filter": "Akromatopsi filtresi",
"Active Sources": "Aktif Kaynaklar",
"Add a new source to your style. You can only choose the source type and id at creation time!": "Stilinize yeni bir kaynak ekleyin. Kaynak türünü ve kimliğini yalnızca oluşturma sırasında seçebilirsiniz!",
"Add filter": "Filtre ekle",
"Add Layer": "Katman Ekle",
"Add New Source": "Yeni Kaynak Ekle",
"Add one of the publicly available sources to your style.": "Stilinize herkese açık kaynaklardan birini ekleyin.",
"Add Source": "Kaynak Ekle",
"Add stop": "Durak ekle",
"Add value": "Değer ekle",
"Add Variable": "Değişken Ekle",
"any filter matches": "herhangi bir filtre eşleşirse",
"API key for Stadia Maps.": "Stadia Maps için API anahtarı.",
"Base": "Temel",
"Bearing": "Yön",
"Cancel": "İptal",
"Center": "Merkez",
"Choose Public Source": "Herkese Açık Kaynak Seç",
"Choose the default Maputnik renderer for this style.": "Bu stil için varsayılan Maputnik işleyicisini seçin.",
"Click to close the editor": "Düzenleyiciyi kapatmak için tıklayın",
"Close": "Kapat",
"Close modal": "Modalı kapat",
"Close popup": "Açılır pencereyi kapat",
"Cluster": "Küme",
"Code Editor": "Kod Düzenleyici",
"Collapse": "Daralt",
"Color accessibility": "Renk erişilebilirliği",
"Comment...": "Yorum...",
"Comments": "Yorumlar",
"Comments for the current layer. This is non-standard and not in the spec.": "Mevcut katman için yorumlar. Bu standart dışıdır ve spesifikasyonda yoktur.",
"Convert property into a elevation function": "Özelliği bir yükseklik fonksiyonuna dönüştür",
"Convert property into a zoom function": "Özelliği bir yakınlaştırma fonksiyonuna dönüştür",
"Convert property to data function": "Özelliği veri fonksiyonuna dönüştür",
"Convert to expression": "İfadeye dönüştür",
"Coord bottom left": "Koordinat sol alt",
"Coord bottom right": "Koordinat sağ alt",
"Coord top left": "Koordinat sol üst",
"Coord top right": "Koordinat sağ üst",
"CORS policy won't allow fetching resources served over http from https, use a <1>https://</1> domain": "CORS politikası, https üzerinden http ile sunulan kaynakların alınmasına izin vermez; <1>https://</1> alan adı kullanın",
"Create HTML": "HTML Oluştur",
"Data Sources": "Veri Kaynakları",
"Data Sources modal": "Veri Kaynakları modalı",
"Data value": "Veri değeri",
"Debug": "Hata Ayıklama",
"Debug modal": "Hata ayıklama modalı",
"Decrease the pitch by 10 degrees.": "Eğimi 10 derece azalt.",
"Decrease the rotation by 15 degrees.": "Dönüşü 15 derece azalt.",
"Decrease the zoom level by 1.": "Yakınlaştırma seviyesini 1 azalt.",
"Decrease the zoom level by 2.": "Yakınlaştırma seviyesini 2 azalt.",
"Default": "Varsayılan",
"Delete": "Sil",
"Delete expression": "İfadeyi sil",
"Delete filter block": "Filtre bloğunu sil",
"Deuteranopia filter": "Döteranopi filtresi",
"Drag and drop a style JSON file here or click to browse": "Bir stil JSON dosyasını buraya sürükleyip bırakın veya göz atmak için tıklayın",
"Duplicate": "Kopyala",
"Encoding": "Kodlama",
"Enter URL...": "URL girin...",
"every filter matches": "tüm filtreler eşleşirse",
"Expand": "Genişlet",
"Export modal": "Dışa aktarma modalı",
"Filter": "Filtre",
"Focus map": "Haritaya odaklan",
"Function": "Fonksiyon",
"Gallery Styles": "Galeri Stilleri",
"General layout properties": "Genel yerleşim özellikleri",
"GeoJSON": "GeoJSON",
"GeoJSON (JSON)": "GeoJSON (JSON)",
"GeoJSON (URL)": "GeoJSON (URL)",
"GeoJSON URL": "GeoJSON URL",
"Global State": "Genel Durum",
"Global State Variables": "Genel Durum Değişkenleri",
"Glyphs URL": "Glif URL'si",
"Help": "Yardım",
"Hide": "Gizle",
"Icon layout properties": "Simge yerleşim özellikleri",
"Icon paint properties": "Simge boyama özellikleri",
"If the Map is in focused you can use the following shortcuts": "Harita odaktaysa aşağıdaki kısayolları kullanabilirsiniz",
"Image": "Görsel",
"Image URL": "Görsel URL'si",
"Increase the pitch by 10 degrees.": "Eğimi 10 derece artır.",
"Increase the rotation by 15 degrees.": "Dönüşü 15 derece artır.",
"Increase the zoom level by 1.": "Yakınlaştırma seviyesini 1 artır.",
"Increase the zoom level by 2.": "Yakınlaştırma seviyesini 2 artır.",
"Input a data property to base styles off of.": "Stilleri temel almak için bir veri özelliği girin.",
"Input value": "Giriş değeri",
"Inspect": "İncele",
"JSON Editor": "JSON Düzenleyici",
"Key": "Anahtar",
"Layer": "Katman",
"Layer editor": "Katman düzenleyici",
"Layer ID already exists": "Katman kimliği zaten var",
"Layers": "Katmanlar",
"Layers list": "Katman listesi",
"Layout properties": "Yerleşim özellikleri",
"Learn More": "Daha Fazla Bilgi",
"Light anchor": "Işık çapası",
"Light color": "Işık rengi",
"Light intensity": "Işık yoğunluğu",
"Light position": "Işık konumu",
"Links": "Bağlantılar",
"Load from a URL. Note that the URL must have <1>CORS enabled</1>.": "Bir URL'den yükleyin. URL'de <1>CORS etkin</1> olmalıdır.",
"Load from URL": "URL'den yükle",
"Loading": "Yükleniyor",
"Loading style": "Stil yükleniyor",
"LocationIQ Access Token": "LocationIQ Erişim Anahtarı",
"Map": "Harita",
"Map view": "Harita görünümü",
"MapTiler Access Token": "MapTiler Erişim Anahtarı",
"Maputnik on GitHub": "GitHub'da Maputnik",
"Max Zoom": "Maks Yakınlaştırma",
"Min Zoom": "Min Yakınlaştırma",
"Move layer down": "Katmanı aşağı taşı",
"Move layer up": "Katmanı yukarı taşı",
"Must provide protocol: <1>http://</1> or <3>https://</3>": "Protokol belirtilmeli: <1>http://</1> veya <3>https://</3>",
"Must provide protocol: <1>https://</1>": "Protokol belirtilmeli: <1>https://</1>",
"Name": "Ad",
"Nested filters are not supported.": "İç içe filtreler desteklenmiyor.",
"no filter matches": "hiçbir filtre eşleşmiyorsa",
"No global state variables defined. Add variables to create reusable values in your style.": "Genel durum değişkeni tanımlanmadı. Stilinizde yeniden kullanılabilir değerler oluşturmak için değişken ekleyin.",
"Open": "Aç",
"Open a local JSON style from your computer.": "Bilgisayarınızdan yerel bir JSON stili açın.",
"Open Layers (experimental)": "Open Layers (deneysel)",
"Open local Style": "Yerel Stili Aç",
"Open modal": "Modalı aç",
"Open one of the publicly available styles to start from.": "Başlamak için herkese açık stillerden birini açın.",
"Open Style": "Stili Aç",
"Options": "Seçenekler",
"Output value": "Çıkış değeri",
"Owner": "Sahip",
"Owner ID of the style. Used by Mapbox or future style APIs.": "Stilin sahip kimliği. Mapbox veya gelecekteki stil API'leri tarafından kullanılır.",
"Paint properties": "Boyama özellikleri",
"Pan down by 100 pixels.": "100 piksel aşağı kaydır.",
"Pan left by 100 pixels.": "100 piksel sola kaydır.",
"Pan right by 100 pixels.": "100 piksel sağa kaydır.",
"Pan up by 100 pixels.": "100 piksel yukarı kaydır.",
"Pitch": "Eğim",
"PMTiles URL": "PMTiles URL",
"Press <1>ESC</1> to lose focus of any active elements, then press one of:": "Etkin öğelerin odağını kaldırmak için <1>ESC</1> tuşuna basın, ardından şunlardan birine basın:",
"Projection": "Projeksiyon",
"Protanopia filter": "Protanopi filtresi",
"Public access token for LocationIQ services.": "LocationIQ hizmetleri için genel erişim anahtarı.",
"Public access token for MapTiler Cloud.": "MapTiler Cloud için genel erişim anahtarı.",
"Public access token for Thunderforest services.": "Thunderforest hizmetleri için genel erişim anahtarı.",
"Raster (Tile URLs)": "Raster (Döşeme URL'leri)",
"Raster (TileJSON URL)": "Raster (TileJSON URL)",
"Raster DEM (TileJSON URL)": "Raster DEM (TileJSON URL)",
"Raster DEM (XYZ URLs)": "Raster DEM (XYZ URL'leri)",
"Remove '{{sourceId}}' source": "'{{sourceId}}' kaynağını kaldır",
"Remove array item": "Dizi öğesini kaldır",
"Remove variable": "Değişkeni kaldır",
"Remove zoom level from stop": "Duraktan yakınlaştırma seviyesini kaldır",
"Revert from expression": "İfadeden geri dön",
"Save": "Kaydet",
"Save as": "Farklı kaydet",
"Save Style": "Stili Kaydet",
"Save the JSON style to your computer.": "JSON stilini bilgisayarınıza kaydedin.",
"Scheme Type": "Şema Türü",
"Search": "Ara",
"Select a type of data scale (default is 'categorical').": "Bir veri ölçeği türü seçin (varsayılan 'categorical').",
"Shortcuts": "Kısayollar",
"Shortcuts menu": "Kısayollar menüsü",
"Show": "Göster",
"Source": "Kaynak",
"Source ID": "Kaynak Kimliği",
"Source Layer": "Kaynak Katmanı",
"Source Type": "Kaynak Türü",
"Sources": "Kaynaklar",
"Sprite URL": "Sprite URL'si",
"Stadia Maps API Key": "Stadia Maps API Anahtarı",
"Stops": "Duraklar",
"Style Renderer": "Stil İşleyici",
"Style Settings": "Stil Ayarları",
"Style Settings modal": "Stil ayarları modalı",
"Style URL": "Stil URL'si",
"Switch to filter editor.": "Filtre düzenleyiciye geç.",
"switch to layer": "katmana geç",
"Terrain exaggeration": "Arazi abartısı",
"Terrain source": "Arazi kaynağı",
"Text layout properties": "Metin yerleşim özellikleri",
"Text paint properties": "Metin boyama özellikleri",
"Thunderforest Access Token": "Thunderforest Erişim Anahtarı",
"Tile Size": "Döşeme Boyutu",
"Tile URL": "Döşeme URL'si",
"TileJSON URL": "TileJSON URL",
"Toggle inspect": "İncelemeyi aç/kapat",
"Transition delay": "Geçiş gecikmesi",
"Transition duration": "Geçiş süresi",
"Tritanopia filter": "Tritanopi filtresi",
"Type": "Tür",
"Unique ID that identifies the source and is used in the layer to reference the source.": "Kaynağı tanımlayan ve katmanda kaynağa referans vermek için kullanılan benzersiz kimlik.",
"Upgrade to expression": "İfadeye yükselt",
"Value": "Değer",
"Vector (PMTiles)": "Vektör (PMTiles)",
"Vector (Tile URLs)": "Vektör (Döşeme URL'leri)",
"Vector (TileJSON URL)": "Vektör (TileJSON URL)",
"Video": "Video",
"Video URL": "Video URL'si",
"View": "Görünüm",
"You've entered an old style filter.": "Eski stilde bir filtre girdiniz.",
"Zoom": "Yakınlaştırma"
}
+1 -2
View File
@@ -199,6 +199,5 @@
"Video URL": "视频URL",
"View": "视图",
"You've entered an old style filter.": "您输入了一个旧风格的过滤器。",
"Zoom": "缩放",
"Drag and drop a style JSON file here or click to browse": "将样式 JSON 文件拖放到此处或点击以浏览"
"Zoom": "缩放"
}
-41
View File
@@ -88,47 +88,6 @@
@extend .maputnik-big-button !optional; /* stylelint-disable-line */
}
.maputnik-upload-dropzone {
border: 2px dashed vars.$color-midgray;
border-radius: 6px;
padding: vars.$margin-4 vars.$margin-3;
text-align: center;
cursor: pointer;
transition: border-color 120ms ease, background-color 120ms ease;
&:hover,
&:focus-visible {
border-color: vars.$color-lowgray;
background-color: rgba(255, 255, 255, 0.03);
}
&:focus-visible {
outline: 2px solid vars.$color-lowgray;
outline-offset: 2px;
}
}
.maputnik-upload-dropzone--active {
border-color: vars.$color-lowgray;
background-color: rgba(255, 255, 255, 0.04);
}
.maputnik-upload-dropzone-content {
display: flex;
flex-direction: column;
align-items: center;
}
.maputnik-upload-dropzone-icon {
font-size: 28px;
color: vars.$color-midgray;
}
.maputnik-upload-dropzone-text {
margin: vars.$margin-2 0 0;
color: vars.$color-lowgray;
}
.maputnik-style-gallery-container {
flex-shrink: 1;
}
+1 -1
View File
@@ -33,7 +33,7 @@
border-radius: 2px;
position: relative;
// HACK: Override
// HACK: Overide
.maputnik-input-block {
margin: vars.$margin-2;
}