mirror of
https://github.com/maputnik/editor.git
synced 2026-07-27 16:27:26 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4179371a53 | |||
| 167f83abe9 | |||
| 0936afc2f9 | |||
| b664caa13e | |||
| d90d7b743b | |||
| 0152a02858 | |||
| 0b076e3896 | |||
| cf54b6fdeb | |||
| e5e09e846a | |||
| 43bb23801c |
@@ -23,7 +23,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with: { persist-credentials: false }
|
with: { persist-credentials: false }
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with: { persist-credentials: false }
|
with: { persist-credentials: false }
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
@@ -92,7 +92,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with: { persist-credentials: false }
|
with: { persist-credentials: false }
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
@@ -113,7 +113,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with: { persist-credentials: false }
|
with: { persist-credentials: false }
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
@@ -141,7 +141,7 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with: { persist-credentials: false }
|
with: { persist-credentials: false }
|
||||||
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a # v4.36.3
|
uses: github/codeql-action/init@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
- name: Use Node.js from nvmrc
|
- name: Use Node.js from nvmrc
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
with: { persist-credentials: false }
|
with: { persist-credentials: false }
|
||||||
|
|
||||||
- name: Use Node.js from nvmrc
|
- name: Use Node.js from nvmrc
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: '.nvmrc'
|
node-version-file: '.nvmrc'
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Use Node.js from nvmrc
|
- name: Use Node.js from nvmrc
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ jobs:
|
|||||||
ref: main
|
ref: main
|
||||||
|
|
||||||
- name: Use Node.js from nvmrc
|
- name: Use Node.js from nvmrc
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||||
with:
|
with:
|
||||||
node-version-file: ".nvmrc"
|
node-version-file: ".nvmrc"
|
||||||
registry-url: "https://registry.npmjs.org"
|
registry-url: "https://registry.npmjs.org"
|
||||||
|
|||||||
Generated
+614
-856
File diff suppressed because it is too large
Load Diff
+7
-7
@@ -37,7 +37,7 @@
|
|||||||
"@mapbox/mapbox-gl-rtl-text": "^0.4.0",
|
"@mapbox/mapbox-gl-rtl-text": "^0.4.0",
|
||||||
"@maplibre/maplibre-gl-geocoder": "^1.9.4",
|
"@maplibre/maplibre-gl-geocoder": "^1.9.4",
|
||||||
"@maplibre/maplibre-gl-inspect": "^1.8.2",
|
"@maplibre/maplibre-gl-inspect": "^1.8.2",
|
||||||
"@maplibre/maplibre-gl-style-spec": "^25.0.2",
|
"@maplibre/maplibre-gl-style-spec": "^26.1.0",
|
||||||
"array-move": "^4.0.0",
|
"array-move": "^4.0.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"downshift": "^9.4.0",
|
"downshift": "^9.4.0",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"i18next": "^26.3.4",
|
"i18next": "^26.3.6",
|
||||||
"i18next-browser-languagedetector": "^8.2.1",
|
"i18next-browser-languagedetector": "^8.2.1",
|
||||||
"i18next-resources-to-backend": "^1.2.1",
|
"i18next-resources-to-backend": "^1.2.1",
|
||||||
"json-stringify-pretty-compact": "^4.0.0",
|
"json-stringify-pretty-compact": "^4.0.0",
|
||||||
@@ -126,24 +126,24 @@
|
|||||||
"@vitejs/plugin-react": "5.2",
|
"@vitejs/plugin-react": "5.2",
|
||||||
"@vitest/coverage-v8": "^4.1.10",
|
"@vitest/coverage-v8": "^4.1.10",
|
||||||
"cors": "^2.8.6",
|
"cors": "^2.8.6",
|
||||||
"eslint": "^10.6.0",
|
"eslint": "^10.7.0",
|
||||||
"eslint-plugin-react": "^7.37.5",
|
"eslint-plugin-react": "^7.37.5",
|
||||||
"eslint-plugin-react-hooks": "^7.1.1",
|
"eslint-plugin-react-hooks": "^7.1.1",
|
||||||
"eslint-plugin-react-refresh": "^0.5.3",
|
"eslint-plugin-react-refresh": "^0.5.3",
|
||||||
"i18next-cli": "^1.65.0",
|
"i18next-cli": "^1.66.2",
|
||||||
"istanbul": "^0.4.5",
|
"istanbul": "^0.4.5",
|
||||||
"istanbul-lib-coverage": "^3.2.2",
|
"istanbul-lib-coverage": "^3.2.2",
|
||||||
"nyc": "^18.0.0",
|
"nyc": "^18.0.0",
|
||||||
"postcss": "^8.5.16",
|
"postcss": "^8.5.19",
|
||||||
"react-hot-loader": "^4.13.1",
|
"react-hot-loader": "^4.13.1",
|
||||||
"sass": "^1.101.0",
|
"sass": "^1.101.0",
|
||||||
"stylelint": "^17.14.0",
|
"stylelint": "^17.14.0",
|
||||||
"stylelint-config-recommended-scss": "^17.0.1",
|
"stylelint-config-recommended-scss": "^17.0.1",
|
||||||
"stylelint-scss": "^7.2.0",
|
"stylelint-scss": "^7.2.0",
|
||||||
"typescript": "^6.0.3",
|
"typescript": "^6.0.3",
|
||||||
"typescript-eslint": "^8.62.1",
|
"typescript-eslint": "^8.64.0",
|
||||||
"uuid": "^14.0.1",
|
"uuid": "^14.0.1",
|
||||||
"vite": "^7.3.2",
|
"vite": "^8.1.5",
|
||||||
"vite-plugin-istanbul": "^9.0.1",
|
"vite-plugin-istanbul": "^9.0.1",
|
||||||
"vitest": "^4.1.10"
|
"vitest": "^4.1.10"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,10 @@ import { InputDynamicArray, type InputDynamicArrayProps } from "./InputDynamicAr
|
|||||||
import { Fieldset } from "./Fieldset";
|
import { Fieldset } from "./Fieldset";
|
||||||
|
|
||||||
type FieldDynamicArrayProps = InputDynamicArrayProps & {
|
type FieldDynamicArrayProps = InputDynamicArrayProps & {
|
||||||
name?: string
|
name?: string;
|
||||||
|
fieldSpec?: {
|
||||||
|
value?: string;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export const FieldDynamicArray: React.FC<FieldDynamicArrayProps> = (props) => {
|
export const FieldDynamicArray: React.FC<FieldDynamicArrayProps> = (props) => {
|
||||||
|
|||||||
@@ -74,20 +74,20 @@ function getLayoutForType(type: LayerSpecification["type"], t: TFunction): Maput
|
|||||||
return getLayoutForSymbolType(t);
|
return getLayoutForSymbolType(t);
|
||||||
}
|
}
|
||||||
const groups: MaputnikLayoutGroup[] = [];
|
const groups: MaputnikLayoutGroup[] = [];
|
||||||
if (Object.keys(v8["paint_" + type]).length > 0) {
|
if (Object.keys(v8["paint_" + type as keyof typeof v8]).length > 0) {
|
||||||
groups.push({
|
groups.push({
|
||||||
title: t("Paint properties"),
|
title: t("Paint properties"),
|
||||||
id: "Paint_properties",
|
id: "Paint_properties",
|
||||||
type: "properties",
|
type: "properties",
|
||||||
fields: Object.keys(v8["paint_" + type]),
|
fields: Object.keys(v8["paint_" + type as keyof typeof v8]),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (Object.keys(v8["layout_" + type]).length > 0) {
|
if (Object.keys(v8["layout_" + type as keyof typeof v8]).length > 0) {
|
||||||
groups.push({
|
groups.push({
|
||||||
title: t("Layout properties"),
|
title: t("Layout properties"),
|
||||||
id: "Layout_properties",
|
id: "Layout_properties",
|
||||||
type: "properties",
|
type: "properties",
|
||||||
fields: Object.keys(v8["layout_" + type])
|
fields: Object.keys(v8["layout_" + type as keyof typeof v8])
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return groups;
|
return groups;
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ function createMaplibreExpressionLinter(spec?: StylePropertySpecification) {
|
|||||||
const text = view.state.doc.toString();
|
const text = view.state.doc.toString();
|
||||||
const parsedJson = JSON.parse(text);
|
const parsedJson = JSON.parse(text);
|
||||||
const ast = jsonToAst(text);
|
const ast = jsonToAst(text);
|
||||||
const out = expression.createExpression(parsedJson, spec);
|
const out = expression.createExpression(parsedJson, "expression", spec);
|
||||||
if (out?.result !== "error") {
|
if (out?.result !== "error") {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -5,14 +5,14 @@ import { type LayerSpecification } from "maplibre-gl";
|
|||||||
export function changeType(layer: LayerSpecification, newType: string): LayerSpecification {
|
export function changeType(layer: LayerSpecification, newType: string): LayerSpecification {
|
||||||
const changedPaintProps: LayerSpecification["paint"] = { ...layer.paint };
|
const changedPaintProps: LayerSpecification["paint"] = { ...layer.paint };
|
||||||
Object.keys(changedPaintProps).forEach(propertyName => {
|
Object.keys(changedPaintProps).forEach(propertyName => {
|
||||||
if(!(propertyName in latest["paint_" + newType])) {
|
if(!(propertyName in ((latest["paint_" + newType as keyof typeof latest]) as string[]))) {
|
||||||
delete changedPaintProps[propertyName as keyof LayerSpecification["paint"]];
|
delete changedPaintProps[propertyName as keyof LayerSpecification["paint"]];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const changedLayoutProps: LayerSpecification["layout"] = { ...layer.layout };
|
const changedLayoutProps: LayerSpecification["layout"] = { ...layer.layout };
|
||||||
Object.keys(changedLayoutProps).forEach(propertyName => {
|
Object.keys(changedLayoutProps).forEach(propertyName => {
|
||||||
if(!(propertyName in latest["layout_" + newType])) {
|
if(!(propertyName in ((latest["layout_" + newType as keyof typeof latest]) as string[]))) {
|
||||||
delete changedLayoutProps[propertyName as keyof LayerSpecification["layout"]];
|
delete changedLayoutProps[propertyName as keyof LayerSpecification["layout"]];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user