From a0c7a5fd64d48fa62840aea7621730563a316e46 Mon Sep 17 00:00:00 2001 From: wgsadmin Date: Mon, 15 Sep 2025 16:14:56 +0200 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73673=20chore:?= =?UTF-8?q?=20update=20woosmap.map=20by=20@wgsadmin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: manz --- types/woosmap.map/index.d.ts | 5 +++++ types/woosmap.map/woosmap.map-tests.ts | 2 ++ 2 files changed, 7 insertions(+) diff --git a/types/woosmap.map/index.d.ts b/types/woosmap.map/index.d.ts index 31ada21938e864..d84fbac2b8524e 100644 --- a/types/woosmap.map/index.d.ts +++ b/types/woosmap.map/index.d.ts @@ -41,6 +41,11 @@ declare namespace woosmap.map { */ constructor(mapDiv: HTMLElement | string, options?: woosmap.map.MapOptions); + /** + * Clean up and release all internal resources associated with this map.This includes DOM elements, event bindings, web workers, and WebGL resources.Use this method when you are done using the map and wish to ensure that it no longer consumes browser resources. Afterwards, you must not call any other methods on the map. + */ + remove(): void; + /** * Sets the viewport to contain the given bounds. */ diff --git a/types/woosmap.map/woosmap.map-tests.ts b/types/woosmap.map/woosmap.map-tests.ts index acb2b647426f7b..34c3b9db81477d 100644 --- a/types/woosmap.map/woosmap.map-tests.ts +++ b/types/woosmap.map/woosmap.map-tests.ts @@ -42,6 +42,8 @@ map.panTo({ lat: 43.3, lng: 3.3 }); map.panToBounds(new woosmap.map.LatLngBounds({ lat: 43.3, lng: 3.3 }, { lat: 48.3, lng: 2.3 }), { left: 100 }); // $ExpectType void map.setZoom(12); +// $ExceptType void +map.remove(); // $ExpectType MVCArray map.overlayMapTypes; From ca24558821f5e973d57134ef487eabdfce0f7510 Mon Sep 17 00:00:00 2001 From: TheLazySquid <76746384+TheLazySquid@users.noreply.github.com> Date: Mon, 15 Sep 2025 11:40:10 -0400 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73674=20fix(gi?= =?UTF-8?q?mloader):=20Allow=20returning=20nothing=20from=20certain=20call?= =?UTF-8?q?backs=20by=20@TheLazySquid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/gimloader/gimloader-tests.ts | 10 ++++++++++ types/gimloader/index.d.ts | 6 ++++-- types/gimloader/package.json | 6 +++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/types/gimloader/gimloader-tests.ts b/types/gimloader/gimloader-tests.ts index 7ed00a97ac0aec..cfbd110a7d2779 100644 --- a/types/gimloader/gimloader-tests.ts +++ b/types/gimloader/gimloader-tests.ts @@ -31,3 +31,13 @@ GL.openSettingsMenu; api.onStop(); // @ts-expect-error api.openSettingsMenu(); + +api.UI.showModal(document.createElement("div"), { + buttons: [ + { text: "Ok", onClick: () => {} }, + { text: "Ok", onClick: () => true }, + ], +}); + +api.patcher.before({}, "foo", () => {}); +api.patcher.before({}, "foo", () => true); diff --git a/types/gimloader/index.d.ts b/types/gimloader/index.d.ts index 9626e01841936e..82827e3972cc41 100644 --- a/types/gimloader/index.d.ts +++ b/types/gimloader/index.d.ts @@ -298,7 +298,8 @@ declare namespace Gimloader { type PatcherInsteadCallback = (thisVal: any, args: IArguments) => void; - type PatcherBeforeCallback = (thisVal: any, args: IArguments) => boolean | undefined; + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + type PatcherBeforeCallback = (thisVal: any, args: IArguments) => boolean | void; type PatcherAfterCallback = (thisVal: any, args: IArguments, returnVal: any) => any; @@ -371,7 +372,8 @@ declare namespace Gimloader { interface ModalButton { text: string; style?: "primary" | "danger" | "close"; - onClick?: (event: MouseEvent) => boolean | undefined; + // eslint-disable-next-line @typescript-eslint/no-invalid-void-type + onClick?: (event: MouseEvent) => boolean | void; } interface ModalOptions { diff --git a/types/gimloader/package.json b/types/gimloader/package.json index 30d88efb82efcc..74232968340692 100644 --- a/types/gimloader/package.json +++ b/types/gimloader/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/gimloader", - "version": "1.6.9999", + "version": "1.7.9999", "nonNpm": "conflict", "nonNpmDescription": "Types for the Gimloader global variables", "projects": [ @@ -18,6 +18,10 @@ { "name": "TheLazySquid", "githubUsername": "TheLazySquid" + }, + { + "name": "Riptide", + "githubUsername": "RiptideAtlantic" } ] } From 2dc0902776680ca9881a9cea10d1f12d0787f120 Mon Sep 17 00:00:00 2001 From: Jimmy Leung <43258070+hkleungai@users.noreply.github.com> Date: Tue, 16 Sep 2025 00:01:32 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73657=20feat(p?= =?UTF-8?q?lotly.js):=20add=20jsdoc=20for=20MapboxLayers,=20fix=20a=20few?= =?UTF-8?q?=20attributes=20by=20@hkleungai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- types/plotly.js/index.d.ts | 117 ++++++++++++++++++++++++- types/plotly.js/test/index-tests.ts | 75 +++++++++++++++- types/plotly.js/v2/index.d.ts | 117 ++++++++++++++++++++++++- types/plotly.js/v2/test/index-tests.ts | 75 +++++++++++++++- 4 files changed, 374 insertions(+), 10 deletions(-) diff --git a/types/plotly.js/index.d.ts b/types/plotly.js/index.d.ts index 6d520a0de7284f..a4f68555123b6b 100644 --- a/types/plotly.js/index.d.ts +++ b/types/plotly.js/index.d.ts @@ -156,16 +156,42 @@ export interface LegendClickEvent { } export interface MapboxCenter { + /** + * Sets the latitude of the center of the map (in degrees North). + */ lon: number; + /** + * Sets the longitude of the center of the map (in degrees East). + */ lat: number; } export interface MapboxSymbol { + /** + * Sets the symbol icon image (mapbox.layer.layout.icon-image). + * Full list: https://www.mapbox.com/maki-icons/ + */ icon: string; + /** + * Sets the symbol icon size (mapbox.layer.layout.icon-size). + * Has an effect only when `type` is set to *symbol*. + */ iconsize: number; + /** + * Sets the symbol text (mapbox.layer.layout.text-field). + */ text: string; + /** + * Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement). + * If `placement` is *point*, the label is placed where the geometry is located. + * If `placement` is *line*, the label is placed along the line of the geometry. + * If `placement` is *line-center*, the label is placed on the center of the geometry. + */ placement: "point" | "line" | "line-center"; textfont: Partial; + /** + * Sets the positions of the `text` elements with respects to the (x,y) coordinates. + */ textposition: | "top left" | "top center" @@ -176,23 +202,106 @@ export interface MapboxSymbol { | "bottom right"; } export interface MapboxLayers { - visible: true; + /** + * Determines whether this layer is displayed. + */ + visible: boolean; + /** + * Sets the source type for this layer, that is the type of the layer data. + */ sourcetype: "geojson" | "vecotr" | "raster" | "image"; - source: number | string; + /** + * Sets the source data for this layer (mapbox.layer.source). + * When `sourcetype` is set to *geojson*, `source` can be a URL to a GeoJSON or a GeoJSON object. + * When `sourcetype` is set to *vector* or *raster*, `source` can be a URL or an array of tile URLs. + * When `sourcetype` is set to *image*, `source` can be a URL to an image. + */ + source: any; + /** + * Specifies the layer to use from a vector tile source (mapbox.layer.source-layer). + * Required for *vector* source type that supports multiple layers. + */ sourcelayer: string; + /** + * Sets the attribution for this source. + */ sourceattribution: string; + /** + * Sets the layer type, + * that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, + * the following values are allowed: *circle*, *line*, *fill* and *symbol*. + * But note that *line* and *fill* are not compatible with Point GeoJSON geometries. + * With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. + * With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed. + */ type: "circle" | "line" | "fill" | "symbol" | "raster"; + /** + * Sets the coordinates array contains [longitude, latitude] pairs for the image corners listed in clockwise order: top left, top right, bottom right, bottom left. + * Only has an effect for *image* `sourcetype`. + */ coordinates: number | string; + /** + * Determines if the layer will be inserted before the layer with the specified ID. + * If omitted or set to '', the layer will be inserted above every existing layer. + */ below: string; + /** + * Sets the primary layer color. + * If `type` is *circle*, color corresponds to the circle color (mapbox.layer.paint.circle-color). + * If `type` is *line*, color corresponds to the line color (mapbox.layer.paint.line-color). + * If `type` is *fill*, color corresponds to the fill color (mapbox.layer.paint.fill-color). + * If `type` is *symbol*, color corresponds to the icon color (mapbox.layer.paint.icon-color). + */ color: Color; + /** + * Sets the opacity of the layer. + * If `type` is *circle*, opacity corresponds to the circle opacity (mapbox.layer.paint.circle-opacity). + * If `type` is *line*, opacity corresponds to the line opacity (mapbox.layer.paint.line-opacity). + * If `type` is *fill*, opacity corresponds to the fill opacity (mapbox.layer.paint.fill-opacity). + * If `type` is *symbol*, opacity corresponds to the icon/text opacity (mapbox.layer.paint.text-opacity). + */ opacity: number; + /** + * Sets the minimum zoom level (mapbox.layer.minzoom). + * At zoom levels less than the minzoom, the layer will be hidden. + */ minzoom: number; + /** + * Sets the maximum zoom level (mapbox.layer.maxzoom). + * At zoom levels equal to or greater than the maxzoom, the layer will be hidden. + */ maxzoom: number; - circle: { radius: number }; + circle: { + /** + * Sets the circle radius (mapbox.layer.paint.circle-radius). + * Has an effect only when `type` is set to *circle*. + */ + radius: number; + }; line: Partial; - fill: { outlinecolor: Color }; + fill: { + /** + * Sets the fill outline color (mapbox.layer.paint.fill-outline-color). + * Has an effect only when `type` is set to *fill*. + */ + outlinecolor: Color; + }; symbol: Partial; + /** + * When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. + * You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` + * alongside your modifications (including `visible: false` or `enabled: false` to hide it). + * Has no effect outside of a template. + */ name: string; + /** + * Used to refer to a named item in this array in the template. + * Named items from the template will be created even without a matching item in the input figure, + * but you can modify one by making an item with `templateitemname` matching its `name`, + * alongside your modifications (including `visible: false` or `enabled: false` to hide it). + * If there is no template or no matching item, + * this item will be hidden unless you explicitly show it with `visible: true`. + */ templateitemname: string; } diff --git a/types/plotly.js/test/index-tests.ts b/types/plotly.js/test/index-tests.ts index f153a1f2a5a20e..2acbb27e296726 100644 --- a/types/plotly.js/test/index-tests.ts +++ b/types/plotly.js/test/index-tests.ts @@ -1241,7 +1241,80 @@ function rand() { bearing: 30, bounds: { east: 0, west: 0, south: 0, north: 0 }, pitch: 0, - layers: [], + layers: [ + { + // Circle layer + visible: true, + sourcetype: "geojson", + source: { + type: "Feature", + properties: {}, + geometry: { + type: "Point", + coordinates: [-74.0060, 40.7128], + }, + }, + type: "circle", + circle: { radius: 10 }, + color: "rgb(255, 0, 0)", + opacity: 0.8, + minzoom: 8, + maxzoom: 15, + }, + { + // Line layer + visible: true, + sourcetype: "geojson", + source: { + type: "Feature", + geometry: { + type: "LineString", + coordinates: [ + [-74.0060, 40.7128], + [-73.9857, 40.7484], + ], + }, + }, + type: "line", + line: { + color: "#00ff00", + width: 2, + dash: "dashdot", + }, + opacity: 0.6, + }, + { + // Symbol layer + visible: true, + sourcetype: "geojson", + source: { + type: "Feature", + geometry: { + type: "Point", + coordinates: [-73.9857, 40.7484], + }, + }, + type: "symbol", + symbol: { + icon: "monument", + iconsize: 1.5, + text: "Empire State", + placement: "point", + textposition: "top center", + textfont: font, + }, + }, + { + // Raster layer + visible: true, + sourcetype: "raster", + source: "mapbox://mapbox.satellite", + type: "raster", + opacity: 0.7, + minzoom: 0, + maxzoom: 22, + }, + ], uirevision: "uirevision", }, margin: { r: 0, t: 0, b: 0, l: 0 }, diff --git a/types/plotly.js/v2/index.d.ts b/types/plotly.js/v2/index.d.ts index 65ceb554fbb546..3d9938c35b0caa 100644 --- a/types/plotly.js/v2/index.d.ts +++ b/types/plotly.js/v2/index.d.ts @@ -156,16 +156,42 @@ export interface LegendClickEvent { } export interface MapboxCenter { + /** + * Sets the latitude of the center of the map (in degrees North). + */ lon: number; + /** + * Sets the longitude of the center of the map (in degrees East). + */ lat: number; } export interface MapboxSymbol { + /** + * Sets the symbol icon image (mapbox.layer.layout.icon-image). + * Full list: https://www.mapbox.com/maki-icons/ + */ icon: string; + /** + * Sets the symbol icon size (mapbox.layer.layout.icon-size). + * Has an effect only when `type` is set to *symbol*. + */ iconsize: number; + /** + * Sets the symbol text (mapbox.layer.layout.text-field). + */ text: string; + /** + * Sets the symbol and/or text placement (mapbox.layer.layout.symbol-placement). + * If `placement` is *point*, the label is placed where the geometry is located. + * If `placement` is *line*, the label is placed along the line of the geometry. + * If `placement` is *line-center*, the label is placed on the center of the geometry. + */ placement: "point" | "line" | "line-center"; textfont: Partial; + /** + * Sets the positions of the `text` elements with respects to the (x,y) coordinates. + */ textposition: | "top left" | "top center" @@ -176,23 +202,106 @@ export interface MapboxSymbol { | "bottom right"; } export interface MapboxLayers { - visible: true; + /** + * Determines whether this layer is displayed. + */ + visible: boolean; + /** + * Sets the source type for this layer, that is the type of the layer data. + */ sourcetype: "geojson" | "vecotr" | "raster" | "image"; - source: number | string; + /** + * Sets the source data for this layer (mapbox.layer.source). + * When `sourcetype` is set to *geojson*, `source` can be a URL to a GeoJSON or a GeoJSON object. + * When `sourcetype` is set to *vector* or *raster*, `source` can be a URL or an array of tile URLs. + * When `sourcetype` is set to *image*, `source` can be a URL to an image. + */ + source: any; + /** + * Specifies the layer to use from a vector tile source (mapbox.layer.source-layer). + * Required for *vector* source type that supports multiple layers. + */ sourcelayer: string; + /** + * Sets the attribution for this source. + */ sourceattribution: string; + /** + * Sets the layer type, + * that is the how the layer data set in `source` will be rendered With `sourcetype` set to *geojson*, + * the following values are allowed: *circle*, *line*, *fill* and *symbol*. + * But note that *line* and *fill* are not compatible with Point GeoJSON geometries. + * With `sourcetype` set to *vector*, the following values are allowed: *circle*, *line*, *fill* and *symbol*. + * With `sourcetype` set to *raster* or `*image*`, only the *raster* value is allowed. + */ type: "circle" | "line" | "fill" | "symbol" | "raster"; + /** + * Sets the coordinates array contains [longitude, latitude] pairs for the image corners listed in clockwise order: top left, top right, bottom right, bottom left. + * Only has an effect for *image* `sourcetype`. + */ coordinates: number | string; + /** + * Determines if the layer will be inserted before the layer with the specified ID. + * If omitted or set to '', the layer will be inserted above every existing layer. + */ below: string; + /** + * Sets the primary layer color. + * If `type` is *circle*, color corresponds to the circle color (mapbox.layer.paint.circle-color). + * If `type` is *line*, color corresponds to the line color (mapbox.layer.paint.line-color). + * If `type` is *fill*, color corresponds to the fill color (mapbox.layer.paint.fill-color). + * If `type` is *symbol*, color corresponds to the icon color (mapbox.layer.paint.icon-color). + */ color: Color; + /** + * Sets the opacity of the layer. + * If `type` is *circle*, opacity corresponds to the circle opacity (mapbox.layer.paint.circle-opacity). + * If `type` is *line*, opacity corresponds to the line opacity (mapbox.layer.paint.line-opacity). + * If `type` is *fill*, opacity corresponds to the fill opacity (mapbox.layer.paint.fill-opacity). + * If `type` is *symbol*, opacity corresponds to the icon/text opacity (mapbox.layer.paint.text-opacity). + */ opacity: number; + /** + * Sets the minimum zoom level (mapbox.layer.minzoom). + * At zoom levels less than the minzoom, the layer will be hidden. + */ minzoom: number; + /** + * Sets the maximum zoom level (mapbox.layer.maxzoom). + * At zoom levels equal to or greater than the maxzoom, the layer will be hidden. + */ maxzoom: number; - circle: { radius: number }; + circle: { + /** + * Sets the circle radius (mapbox.layer.paint.circle-radius). + * Has an effect only when `type` is set to *circle*. + */ + radius: number; + }; line: Partial; - fill: { outlinecolor: Color }; + fill: { + /** + * Sets the fill outline color (mapbox.layer.paint.fill-outline-color). + * Has an effect only when `type` is set to *fill*. + */ + outlinecolor: Color; + }; symbol: Partial; + /** + * When used in a template, named items are created in the output figure in addition to any items the figure already has in this array. + * You can modify these items in the output figure by making your own item with `templateitemname` matching this `name` + * alongside your modifications (including `visible: false` or `enabled: false` to hide it). + * Has no effect outside of a template. + */ name: string; + /** + * Used to refer to a named item in this array in the template. + * Named items from the template will be created even without a matching item in the input figure, + * but you can modify one by making an item with `templateitemname` matching its `name`, + * alongside your modifications (including `visible: false` or `enabled: false` to hide it). + * If there is no template or no matching item, + * this item will be hidden unless you explicitly show it with `visible: true`. + */ templateitemname: string; } diff --git a/types/plotly.js/v2/test/index-tests.ts b/types/plotly.js/v2/test/index-tests.ts index 109e852acc1a05..4d555461f32fa7 100644 --- a/types/plotly.js/v2/test/index-tests.ts +++ b/types/plotly.js/v2/test/index-tests.ts @@ -1246,7 +1246,80 @@ function rand() { bearing: 30, bounds: { east: 0, west: 0, south: 0, north: 0 }, pitch: 0, - layers: [], + layers: [ + { + // Circle layer + visible: true, + sourcetype: "geojson", + source: { + type: "Feature", + properties: {}, + geometry: { + type: "Point", + coordinates: [-74.0060, 40.7128], + }, + }, + type: "circle", + circle: { radius: 10 }, + color: "rgb(255, 0, 0)", + opacity: 0.8, + minzoom: 8, + maxzoom: 15, + }, + { + // Line layer + visible: true, + sourcetype: "geojson", + source: { + type: "Feature", + geometry: { + type: "LineString", + coordinates: [ + [-74.0060, 40.7128], + [-73.9857, 40.7484], + ], + }, + }, + type: "line", + line: { + color: "#00ff00", + width: 2, + dash: "dashdot", + }, + opacity: 0.6, + }, + { + // Symbol layer + visible: true, + sourcetype: "geojson", + source: { + type: "Feature", + geometry: { + type: "Point", + coordinates: [-73.9857, 40.7484], + }, + }, + type: "symbol", + symbol: { + icon: "monument", + iconsize: 1.5, + text: "Empire State", + placement: "point", + textposition: "top center", + textfont: font, + }, + }, + { + // Raster layer + visible: true, + sourcetype: "raster", + source: "mapbox://mapbox.satellite", + type: "raster", + opacity: 0.7, + minzoom: 0, + maxzoom: 22, + }, + ], uirevision: "uirevision", }, margin: { r: 0, t: 0, b: 0, l: 0 }, From 4e50cce588554cfbaaa0e4d31116f82448da26bf Mon Sep 17 00:00:00 2001 From: Vladislav Mamenko Date: Mon, 15 Sep 2025 19:15:26 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=A4=96=20Merge=20PR=20#73483=20fix(re?= =?UTF-8?q?act-virtualized):=20Made=20Grid=20`scrollToPosition`=20and=20`s?= =?UTF-8?q?crollToCell`=20params=20optional=20by=20@kttmv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Владислав Маменко --- types/react-virtualized/dist/es/Grid.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/react-virtualized/dist/es/Grid.d.ts b/types/react-virtualized/dist/es/Grid.d.ts index 0e18ce16e37196..3c8c137c9605a4 100644 --- a/types/react-virtualized/dist/es/Grid.d.ts +++ b/types/react-virtualized/dist/es/Grid.d.ts @@ -423,13 +423,13 @@ export class Grid extends PureComponent { /** * Ensure column and row are visible. */ - scrollToCell(params: { columnIndex: number; rowIndex: number }): void; + scrollToCell(params: { columnIndex?: number; rowIndex?: number }): void; /** * Scroll to the specified offset(s). * Useful for animating position changes. */ - scrollToPosition(params?: { scrollLeft: number; scrollTop: number }): void; + scrollToPosition(params: { scrollLeft?: number; scrollTop?: number }): void; } export default Grid;