Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/mapbox__mapbox-gl-draw

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/mapbox__mapbox-gl-draw - npm Package Compare versions

Comparing version 1.4.6 to 1.4.7

63

mapbox__mapbox-gl-draw/index.d.ts
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).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc