@types/mapbox__mapbox-gl-draw
Advanced tools
Comparing version 1.4.6 to 1.4.7
import { BBox, Feature, FeatureCollection, GeoJSON, GeoJsonTypes, Geometry, Point, Position } from "geojson"; | ||
import { | ||
CircleLayer, | ||
FillLayer, | ||
CircleLayerSpecification, | ||
ControlPosition, | ||
FillLayerSpecification, | ||
IControl, | ||
LineLayer, | ||
LineLayerSpecification, | ||
Map, | ||
MapboxEvent, | ||
MapEvent, | ||
MapMouseEvent as MapboxMapMouseEvent, | ||
@@ -16,15 +17,33 @@ MapTouchEvent as MapboxMapTouchEvent, | ||
type EventOf<T extends MapboxDraw.DrawEventType, Target = unknown> = keyof MapboxDraw.DrawEvents[T] extends never ? { | ||
type: T; | ||
target: Target; | ||
} | ||
: { | ||
type: T; | ||
target: Target; | ||
} & MapboxDraw.DrawEvents[T]; | ||
declare module "mapbox-gl" { | ||
interface Map { | ||
on<T extends MapboxDraw.DrawEventType>(type: T, listener: (event: EventOf<T>) => void): this; | ||
off<T extends MapboxDraw.DrawEventType>(type: T, listener: (event: EventOf<T>) => void): this; | ||
} | ||
} | ||
declare namespace MapboxDraw { | ||
type DrawMode = DrawModes[keyof DrawModes]; | ||
type DrawEventType = | ||
| "draw.create" | ||
| "draw.delete" | ||
| "draw.update" | ||
| "draw.render" | ||
| "draw.combine" | ||
| "draw.uncombine" | ||
| "draw.modechange" | ||
| "draw.actionable" | ||
| "draw.selectionchange"; | ||
interface DrawEvents { | ||
"draw.create": MapboxDraw.DrawCreateEvent; | ||
"draw.delete": MapboxDraw.DrawDeleteEvent; | ||
"draw.update": MapboxDraw.DrawUpdateEvent; | ||
"draw.selectionchange": MapboxDraw.DrawSelectionChangeEvent; | ||
"draw.render": MapboxDraw.DrawRenderEvent; | ||
"draw.combine": MapboxDraw.DrawCombineEvent; | ||
"draw.uncombine": MapboxDraw.DrawUncombineEvent; | ||
"draw.modechange": MapboxDraw.DrawModeChangeEvent; | ||
"draw.actionable": MapboxDraw.DrawActionableEvent; | ||
} | ||
type DrawEventType = keyof DrawEvents; | ||
@@ -182,3 +201,3 @@ interface DrawModes { | ||
interface DrawCustomModeThis { | ||
map: mapboxgl.Map; | ||
map: Map; | ||
@@ -394,3 +413,3 @@ drawConfig: MapboxDrawOptions; | ||
) => (e: MapMouseEvent | MapTouchEvent) => boolean; | ||
isShiftMousedown: (e: MapboxEvent) => boolean; | ||
isShiftMousedown: (e: MapEvent) => boolean; | ||
isActiveFeature: (e: MapMouseEvent | MapTouchEvent) => boolean; | ||
@@ -401,3 +420,3 @@ isInactiveFeature: (e: MapMouseEvent | MapTouchEvent) => boolean; | ||
isVertex: (e: MapMouseEvent | MapTouchEvent) => boolean; | ||
isShiftDown: (e: MapboxEvent) => boolean; | ||
isShiftDown: (e: MapEvent) => boolean; | ||
isEscapeKey: (e: KeyboardEvent) => boolean; | ||
@@ -510,3 +529,5 @@ isEnterKey: (e: KeyboardEvent) => boolean; | ||
theme: Array<(FillLayer | LineLayer | CircleLayer) & { id: ThemeLayerId }>; | ||
theme: Array< | ||
(FillLayerSpecification | LineLayerSpecification | CircleLayerSpecification) & { id: ThemeLayerId } | ||
>; | ||
@@ -560,3 +581,3 @@ /** | ||
getDefaultPosition: () => string; | ||
getDefaultPosition: () => ControlPosition; | ||
@@ -604,5 +625,5 @@ constructor(options?: MapboxDraw.MapboxDrawOptions); | ||
onAdd(map: mapboxgl.Map): HTMLElement; | ||
onAdd(map: Map): HTMLElement; | ||
onRemove(map: mapboxgl.Map): any; | ||
onRemove(map: Map): any; | ||
} |
{ | ||
"name": "@types/mapbox__mapbox-gl-draw", | ||
"version": "1.4.6", | ||
"version": "1.4.7", | ||
"description": "TypeScript definitions for @mapbox/mapbox-gl-draw", | ||
@@ -22,2 +22,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mapbox__mapbox-gl-draw", | ||
"url": "https://github.com/joel-daros" | ||
}, | ||
{ | ||
"name": "Brook Jordan", | ||
"githubUsername": "brookjordan", | ||
"url": "https://github.com/brookjordan" | ||
} | ||
@@ -35,6 +40,6 @@ ], | ||
"@types/geojson": "*", | ||
"@types/mapbox-gl": "*" | ||
"mapbox-gl": "*" | ||
}, | ||
"typesPublisherContentHash": "93d90199254dab0c42becce5041ec48f5333f2c598d181fb0803e0076292c202", | ||
"typeScriptVersion": "4.5" | ||
"typesPublisherContentHash": "e29ac0f8ccaa01fdd2842171d9988f718163086f34c98ab10a6242a27ee8a790", | ||
"typeScriptVersion": "4.8" | ||
} |
@@ -11,6 +11,6 @@ # Installation | ||
### Additional Details | ||
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT | ||
* Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [@types/mapbox-gl](https://npmjs.com/package/@types/mapbox-gl) | ||
* Last updated: Tue, 30 Jul 2024 15:36:14 GMT | ||
* Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson), [mapbox-gl](https://npmjs.com/package/mapbox-gl) | ||
# Credits | ||
These definitions were written by [Tudor Gergely](https://github.com/tudorgergely), [Shayan Toqraee](https://github.com/Shayan-To), and [Joel Daros](https://github.com/joel-daros). | ||
These definitions were written by [Tudor Gergely](https://github.com/tudorgergely), [Shayan Toqraee](https://github.com/Shayan-To), [Joel Daros](https://github.com/joel-daros), and [Brook Jordan](https://github.com/brookjordan). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24639
497
1
+ Addedmapbox-gl@*
+ Added@mapbox/jsonlint-lines-primitives@2.0.2(transitive)
+ Added@mapbox/mapbox-gl-supported@3.0.0(transitive)
+ Added@mapbox/point-geometry@0.1.0(transitive)
+ Added@mapbox/tiny-sdf@2.0.6(transitive)
+ Added@mapbox/unitbezier@0.0.1(transitive)
+ Added@mapbox/vector-tile@1.3.1(transitive)
+ Added@mapbox/whoots-js@3.1.0(transitive)
+ Added@types/geojson-vt@3.2.5(transitive)
+ Added@types/mapbox__point-geometry@0.1.4(transitive)
+ Added@types/mapbox__vector-tile@1.3.4(transitive)
+ Added@types/pbf@3.0.5(transitive)
+ Added@types/supercluster@7.1.3(transitive)
+ Addedcheap-ruler@4.0.0(transitive)
+ Addedcsscolorparser@1.0.3(transitive)
+ Addedearcut@3.0.0(transitive)
+ Addedgeojson-vt@4.0.2(transitive)
+ Addedgl-matrix@3.4.3(transitive)
+ Addedgrid-index@1.1.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedkdbush@4.0.2(transitive)
+ Addedmapbox-gl@3.8.0(transitive)
+ Addedmurmurhash-js@1.0.0(transitive)
+ Addedpbf@3.3.0(transitive)
+ Addedpotpack@2.0.0(transitive)
+ Addedprotocol-buffers-schema@3.6.0(transitive)
+ Addedquickselect@3.0.0(transitive)
+ Addedresolve-protobuf-schema@2.1.0(transitive)
+ Addedserialize-to-js@3.1.2(transitive)
+ Addedsupercluster@8.0.1(transitive)
+ Addedtinyqueue@3.0.0(transitive)
+ Addedvt-pbf@3.1.3(transitive)
- Removed@types/mapbox-gl@*
- Removed@types/mapbox-gl@3.4.1(transitive)