terra-draw
Advanced tools
Comparing version 0.0.1-alpha.63 to 0.0.1-alpha.64
@@ -5,8 +5,14 @@ { | ||
"build": { | ||
"args": { "NODE_MAJOR_VERSION": "18" } | ||
"args": { | ||
"NODE_MAJOR_VERSION": "20" | ||
} | ||
}, | ||
"postCreateCommand": [".devcontainer/post-create.sh"], | ||
"portsAttributes": { | ||
"3000": { "label": "Docs" }, | ||
"9000": { "label": "Development" } | ||
"3000": { | ||
"label": "Docs" | ||
}, | ||
"9000": { | ||
"label": "Development" | ||
} | ||
}, | ||
@@ -13,0 +19,0 @@ "customizations": { |
@@ -6,3 +6,3 @@ import { TerraDrawMouseEvent } from "../../../common"; | ||
import { SelectionPointBehavior } from "./selection-point.behavior"; | ||
import { FeatureId } from "../../../store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store"; | ||
export type ResizeOptions = "center-web-mercator" | "opposite-web-mercator" | "center-fixed-web-mercator" | "opposite-fixed-web-mercator"; | ||
@@ -62,3 +62,3 @@ export declare class DragCoordinateResizeBehavior extends TerraDrawModeBehavior { | ||
*/ | ||
drag(event: TerraDrawMouseEvent, resizeOption: ResizeOptions): boolean; | ||
drag(event: TerraDrawMouseEvent, resizeOption: ResizeOptions, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): boolean; | ||
} |
@@ -6,3 +6,3 @@ import { TerraDrawMouseEvent } from "../../../common"; | ||
import { SelectionPointBehavior } from "./selection-point.behavior"; | ||
import { FeatureId } from "../../../store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store"; | ||
export declare class DragCoordinateBehavior extends TerraDrawModeBehavior { | ||
@@ -17,3 +17,3 @@ readonly config: BehaviorConfig; | ||
getDraggableIndex(event: TerraDrawMouseEvent, selectedId: FeatureId): number; | ||
drag(event: TerraDrawMouseEvent, allowSelfIntersection: boolean): boolean; | ||
drag(event: TerraDrawMouseEvent, allowSelfIntersection: boolean, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): boolean; | ||
isDragging(): boolean; | ||
@@ -20,0 +20,0 @@ startDragging(id: FeatureId, index: number): void; |
@@ -6,3 +6,3 @@ import { TerraDrawMouseEvent } from "../../../common"; | ||
import { MidPointBehavior } from "./midpoint.behavior"; | ||
import { FeatureId } from "../../../store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store"; | ||
export declare class DragFeatureBehavior extends TerraDrawModeBehavior { | ||
@@ -20,3 +20,3 @@ readonly config: BehaviorConfig; | ||
canDrag(event: TerraDrawMouseEvent, selectedId: FeatureId): boolean; | ||
drag(event: TerraDrawMouseEvent): false | undefined; | ||
drag(event: TerraDrawMouseEvent, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): false | undefined; | ||
} |
@@ -5,3 +5,3 @@ import { TerraDrawMouseEvent } from "../../../common"; | ||
import { MidPointBehavior } from "./midpoint.behavior"; | ||
import { FeatureId } from "../../../store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store"; | ||
export declare class RotateFeatureBehavior extends TerraDrawModeBehavior { | ||
@@ -14,3 +14,3 @@ readonly config: BehaviorConfig; | ||
reset(): void; | ||
rotate(event: TerraDrawMouseEvent, selectedId: FeatureId): void; | ||
rotate(event: TerraDrawMouseEvent, selectedId: FeatureId, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): false | undefined; | ||
} |
@@ -5,3 +5,3 @@ import { TerraDrawMouseEvent } from "../../../common"; | ||
import { MidPointBehavior } from "./midpoint.behavior"; | ||
import { FeatureId } from "../../../store/store"; | ||
import { FeatureId, GeoJSONStoreFeatures } from "../../../store/store"; | ||
export declare class ScaleFeatureBehavior extends TerraDrawModeBehavior { | ||
@@ -14,3 +14,3 @@ readonly config: BehaviorConfig; | ||
reset(): void; | ||
scale(event: TerraDrawMouseEvent, selectedId: FeatureId): void; | ||
scale(event: TerraDrawMouseEvent, selectedId: FeatureId, validateFeature?: (feature: GeoJSONStoreFeatures) => boolean): false | undefined; | ||
} |
@@ -14,2 +14,3 @@ import { TerraDrawMouseEvent, TerraDrawKeyboardEvent, TerraDrawAdapterStyling, HexColorStyling, NumericStyling, Cursor } from "../../common"; | ||
feature?: { | ||
validation?: (geometry: GeoJSONStoreFeatures) => boolean; | ||
draggable?: boolean; | ||
@@ -82,2 +83,3 @@ rotateable?: boolean; | ||
private cursors; | ||
private validations; | ||
constructor(options?: TerraDrawSelectModeOptions<SelectionStyling>); | ||
@@ -84,0 +86,0 @@ selectFeature(featureId: FeatureId): void; |
@@ -23,3 +23,3 @@ import { Feature, Point, Polygon, LineString } from "geojson"; | ||
export declare const defaultIdStrategy: { | ||
getId: <FeatureId_1>() => FeatureId_1; | ||
getId: <FeatureId>() => FeatureId; | ||
isValidId: (id: FeatureId) => boolean; | ||
@@ -26,0 +26,0 @@ }; |
@@ -21,2 +21,4 @@ import { TerraDrawGoogleMapsAdapter } from "./adapters/google-maps.adapter"; | ||
import { BehaviorConfig } from "./modes/base.behavior"; | ||
import { ValidateMinSizeSquareMeters } from "./validations/min-size.validation"; | ||
import { ValidateMaxSizeSquareMeters } from "./validations/max-size.validation"; | ||
type FinishListener = (ids: FeatureId) => void; | ||
@@ -221,2 +223,2 @@ type ChangeListener = (ids: FeatureId[], type: string) => void; | ||
}; | ||
export { TerraDraw, TerraDrawSelectMode, TerraDrawPointMode, TerraDrawLineStringMode, TerraDrawGreatCircleMode, TerraDrawPolygonMode, TerraDrawCircleMode, TerraDrawFreehandMode, TerraDrawRenderMode, TerraDrawRectangleMode, TerraDrawGoogleMapsAdapter, TerraDrawMapboxGLAdapter, TerraDrawLeafletAdapter, TerraDrawMapLibreGLAdapter, TerraDrawOpenLayersAdapter, TerraDrawArcGISMapsSDKAdapter, TerraDrawExtend, BehaviorConfig, GeoJSONStoreFeatures, HexColor, TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawChanges, TerraDrawStylingFunction, Project, Unproject, SetCursor, GetLngLatFromEvent, }; | ||
export { TerraDraw, TerraDrawSelectMode, TerraDrawPointMode, TerraDrawLineStringMode, TerraDrawGreatCircleMode, TerraDrawPolygonMode, TerraDrawCircleMode, TerraDrawFreehandMode, TerraDrawRenderMode, TerraDrawRectangleMode, TerraDrawGoogleMapsAdapter, TerraDrawMapboxGLAdapter, TerraDrawLeafletAdapter, TerraDrawMapLibreGLAdapter, TerraDrawOpenLayersAdapter, TerraDrawArcGISMapsSDKAdapter, TerraDrawExtend, BehaviorConfig, GeoJSONStoreFeatures, HexColor, TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, TerraDrawChanges, TerraDrawStylingFunction, Project, Unproject, SetCursor, GetLngLatFromEvent, ValidateMinSizeSquareMeters, ValidateMaxSizeSquareMeters, }; |
{ | ||
"name": "terra-draw", | ||
"version": "0.0.1-alpha.63", | ||
"version": "0.0.1-alpha.64", | ||
"description": "Frictionless map drawing across mapping provider", | ||
@@ -58,11 +58,11 @@ "scripts": { | ||
"@googlemaps/js-api-loader": "^1.14.3", | ||
"@swc/jest": "^0.2.29", | ||
"@swc/jest": "^0.2.36", | ||
"@types/geojson": "^7946.0.8", | ||
"@types/google.maps": "^3.49.2", | ||
"@types/jest": "^28.1.5", | ||
"@types/jest": "^29.5.12", | ||
"@types/leaflet": "^1.7.11", | ||
"@types/mapbox-gl": "^2.7.3", | ||
"@types/rbush": "^3.0.0", | ||
"@typescript-eslint/eslint-plugin": "^6.7.4", | ||
"@typescript-eslint/parser": "^6.7.4", | ||
"@typescript-eslint/eslint-plugin": "^7.5.0", | ||
"@typescript-eslint/parser": "^7.5.0", | ||
"eslint": "^8.24.0", | ||
@@ -72,3 +72,3 @@ "eslint-config-prettier": "^9.0.0", | ||
"husky": "^7.0.0", | ||
"jest": "^29.3.1", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
@@ -82,7 +82,7 @@ "leaflet": "^1.8.0", | ||
"standard-version": "^9.5.0", | ||
"ts-jest": "^29.1.0", | ||
"ts-loader": "^9.4.2", | ||
"tsx": "^4.7.0", | ||
"typedoc": "^0.25.1", | ||
"typescript": "^5.2.2" | ||
"ts-jest": "^29.1.2", | ||
"ts-loader": "^9.5.1", | ||
"tsx": "^4.7.2", | ||
"typedoc": "^0.25.12", | ||
"typescript": "^5.4.4" | ||
}, | ||
@@ -89,0 +89,0 @@ "commitlint": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
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
4205977
9138