Update style-spec package to 26.1 (#2005)

## Launch Checklist

Update style-spec package to version 26.1
This should solve a problem related to expression validation.

 - [x] Briefly describe the changes in this PR.
 - [x] Link to related issues.
This commit is contained in:
Harel M
2026-07-14 14:14:28 +03:00
committed by GitHub
parent e5e09e846a
commit cf54b6fdeb
6 changed files with 16 additions and 13 deletions
+4 -4
View File
@@ -20,7 +20,7 @@
"@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.2",
"@maplibre/maplibre-gl-style-spec": "^26.1.0",
"array-move": "^4.0.0",
"buffer": "^6.0.3",
"classnames": "^2.5.1",
@@ -2179,9 +2179,9 @@
}
},
"node_modules/@maplibre/maplibre-gl-style-spec": {
"version": "25.0.2",
"resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-25.0.2.tgz",
"integrity": "sha512-hTNlIVG1gaLKz6UvOV23PYcT8wVS69LLMK9jbGT2hDWzs6hlTbMejeMyQsAF0rebj9czVp77Vhp4KRaUHHUp9g==",
"version": "26.1.0",
"resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-26.1.0.tgz",
"integrity": "sha512-JaVj0XqDWFb2xfaRFCvF2Gi7qSpCYXXJlVghDDfRUV2dks61YsQKDjlZKT3H+oVwFBxX7CjErz9zjdGTEP/Lug==",
"license": "ISC",
"dependencies": {
"@mapbox/jsonlint-lines-primitives": "^2.0.3",
+1 -1
View File
@@ -37,7 +37,7 @@
"@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.2",
"@maplibre/maplibre-gl-style-spec": "^26.1.0",
"array-move": "^4.0.0",
"buffer": "^6.0.3",
"classnames": "^2.5.1",
+4 -1
View File
@@ -2,7 +2,10 @@ import { InputDynamicArray, type InputDynamicArrayProps } from "./InputDynamicAr
import { Fieldset } from "./Fieldset";
type FieldDynamicArrayProps = InputDynamicArrayProps & {
name?: string
name?: string;
fieldSpec?: {
value?: string;
}
};
export const FieldDynamicArray: React.FC<FieldDynamicArrayProps> = (props) => {
+4 -4
View File
@@ -74,20 +74,20 @@ function getLayoutForType(type: LayerSpecification["type"], t: TFunction): Maput
return getLayoutForSymbolType(t);
}
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({
title: t("Paint properties"),
id: "Paint_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({
title: t("Layout properties"),
id: "Layout_properties",
type: "properties",
fields: Object.keys(v8["layout_" + type])
fields: Object.keys(v8["layout_" + type as keyof typeof v8])
});
}
return groups;
+1 -1
View File
@@ -119,7 +119,7 @@ function createMaplibreExpressionLinter(spec?: StylePropertySpecification) {
const text = view.state.doc.toString();
const parsedJson = JSON.parse(text);
const ast = jsonToAst(text);
const out = expression.createExpression(parsedJson, spec);
const out = expression.createExpression(parsedJson, "expression", spec);
if (out?.result !== "error") {
return [];
}
+2 -2
View File
@@ -5,14 +5,14 @@ import { type LayerSpecification } from "maplibre-gl";
export function changeType(layer: LayerSpecification, newType: string): LayerSpecification {
const changedPaintProps: LayerSpecification["paint"] = { ...layer.paint };
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"]];
}
});
const changedLayoutProps: LayerSpecification["layout"] = { ...layer.layout };
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"]];
}
});