terra-draw 0.0.1-alpha.68 → 0.0.1-alpha.69

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/adapters/google-maps.adapter.d.ts +0 -1
  2. package/dist/common.d.ts +1 -0
  3. package/dist/geometry/measure/bearing.d.ts +2 -0
  4. package/dist/geometry/measure/destination.d.ts +2 -0
  5. package/dist/geometry/measure/slice-along.d.ts +2 -0
  6. package/dist/geometry/shape/create-bbox.d.ts +1 -1
  7. package/dist/geometry/shape/create-circle.d.ts +6 -0
  8. package/dist/geometry/shape/great-circle-coordinates.d.ts +2 -0
  9. package/dist/geometry/shape/web-mercator-distortion.d.ts +2 -0
  10. package/dist/modes/circle/circle.mode.d.ts +3 -1
  11. package/dist/modes/insert-coordinates.behavior.d.ts +9 -0
  12. package/dist/modes/linestring/linestring.mode.d.ts +15 -1
  13. package/dist/modes/static/static.mode.d.ts +5 -5
  14. package/dist/terra-draw.cjs +1 -1
  15. package/dist/terra-draw.cjs.map +1 -1
  16. package/dist/terra-draw.d.ts +1 -2
  17. package/dist/terra-draw.modern.js +1 -1
  18. package/dist/terra-draw.modern.js.map +1 -1
  19. package/dist/terra-draw.module.js +1 -1
  20. package/dist/terra-draw.module.js.map +1 -1
  21. package/dist/terra-draw.umd.js +1 -1
  22. package/dist/terra-draw.umd.js.map +1 -1
  23. package/dist/validations/max-size.validation.d.ts +1 -1
  24. package/e2e/package-lock.json +114 -72
  25. package/e2e/package.json +1 -1
  26. package/e2e/public/index.html +0 -1
  27. package/e2e/tests/leaflet.spec.ts +111 -45
  28. package/e2e/tests/setup.ts +9 -9
  29. package/package.json +9 -8
  30. package/dist/geometry/shape/great-circle-line.d.ts +0 -12
  31. package/dist/modes/great-circle-snapping.behavior.d.ts +0 -14
  32. package/dist/modes/greatcircle/great-circle.mode.d.ts +0 -64
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terra-draw",
3
- "version": "0.0.1-alpha.68",
3
+ "version": "0.0.1-alpha.69",
4
4
  "description": "Frictionless map drawing across mapping provider",
5
5
  "scripts": {
6
6
  "docs": "typedoc",
@@ -59,18 +59,18 @@
59
59
  "@types/geojson": "7946.0.8",
60
60
  "@types/google.maps": "3.49.2",
61
61
  "@types/jest": "29.5.12",
62
- "@types/leaflet": "1.7.11",
62
+ "@types/leaflet": "^1.9.12",
63
63
  "@types/mapbox-gl": "2.7.3",
64
64
  "@types/rbush": "3.0.0",
65
- "@typescript-eslint/eslint-plugin": "7.5.0",
66
- "@typescript-eslint/parser": "7.5.0",
65
+ "@typescript-eslint/eslint-plugin": "7.14.1",
66
+ "@typescript-eslint/parser": "7.14.1",
67
67
  "eslint": "8.57.0",
68
68
  "eslint-config-prettier": "9.0.0",
69
69
  "eslint-plugin-prettier": "5.0.0",
70
70
  "husky": "7.0.0",
71
71
  "jest": "29.7.0",
72
72
  "jest-environment-jsdom": "29.7.0",
73
- "leaflet": "1.8.0",
73
+ "leaflet": "^1.9.4",
74
74
  "mapbox-gl": "2.13.0",
75
75
  "maplibre-gl": "3.2.0",
76
76
  "microbundle": "0.15.0",
@@ -80,8 +80,8 @@
80
80
  "ts-jest": "29.1.2",
81
81
  "ts-loader": "9.5.1",
82
82
  "tsx": "4.7.2",
83
- "typedoc": "0.25.12",
84
- "typescript": "5.4.4"
83
+ "typedoc": "^0.26.2",
84
+ "typescript": "5.5.2"
85
85
  },
86
86
  "commitlint": {
87
87
  "extends": [
@@ -154,5 +154,6 @@
154
154
  "section": "Reverts"
155
155
  }
156
156
  ]
157
- }
157
+ },
158
+ "sideEffects": false
158
159
  }
@@ -1,12 +0,0 @@
1
- import { Feature, LineString, Position } from "geojson";
2
- import { JSONObject } from "../../store/store";
3
- export declare function greatCircleLine<Properties extends JSONObject>({ start, end, options, }: {
4
- start: Position;
5
- end: Position;
6
- options?: {
7
- numberOfPoints?: number;
8
- offset?: number;
9
- properties?: Properties;
10
- coordinatePrecision?: number;
11
- };
12
- }): Feature<LineString, import("geojson").GeoJsonProperties> | null;
@@ -1,14 +0,0 @@
1
- import { BehaviorConfig, TerraDrawModeBehavior } from "./base.behavior";
2
- import { TerraDrawMouseEvent } from "../common";
3
- import { Position } from "geojson";
4
- import { ClickBoundingBoxBehavior } from "./click-bounding-box.behavior";
5
- import { FeatureId } from "../store/store";
6
- import { PixelDistanceBehavior } from "./pixel-distance.behavior";
7
- export declare class GreatCircleSnappingBehavior extends TerraDrawModeBehavior {
8
- readonly config: BehaviorConfig;
9
- private readonly pixelDistance;
10
- private readonly clickBoundingBox;
11
- constructor(config: BehaviorConfig, pixelDistance: PixelDistanceBehavior, clickBoundingBox: ClickBoundingBoxBehavior);
12
- getSnappableCoordinate: (event: TerraDrawMouseEvent, currentFeatureId?: FeatureId) => Position | undefined;
13
- private getSnappableEnds;
14
- }
@@ -1,64 +0,0 @@
1
- import { TerraDrawMouseEvent, TerraDrawAdapterStyling, TerraDrawKeyboardEvent, HexColorStyling, NumericStyling, Cursor } from "../../common";
2
- import { BaseModeOptions, CustomStyling, TerraDrawBaseDrawMode } from "../base.mode";
3
- import { BehaviorConfig } from "../base.behavior";
4
- import { GeoJSONStoreFeatures } from "../../store/store";
5
- type TerraDrawGreateCircleModeKeyEvents = {
6
- cancel: KeyboardEvent["key"] | null;
7
- finish: KeyboardEvent["key"] | null;
8
- };
9
- type GreateCircleStyling = {
10
- lineStringWidth: NumericStyling;
11
- lineStringColor: HexColorStyling;
12
- closingPointColor: HexColorStyling;
13
- closingPointWidth: NumericStyling;
14
- closingPointOutlineColor: HexColorStyling;
15
- closingPointOutlineWidth: NumericStyling;
16
- };
17
- interface Cursors {
18
- start?: Cursor;
19
- close?: Cursor;
20
- }
21
- interface TerraDrawGreatCircleModeOptions<T extends CustomStyling> extends BaseModeOptions<T> {
22
- snapping?: boolean;
23
- pointerDistance?: number;
24
- keyEvents?: TerraDrawGreateCircleModeKeyEvents | null;
25
- cursors?: Cursors;
26
- }
27
- export declare class TerraDrawGreatCircleMode extends TerraDrawBaseDrawMode<GreateCircleStyling> {
28
- mode: string;
29
- private currentCoordinate;
30
- private currentId;
31
- private closingPointId;
32
- private keyEvents;
33
- private snappingEnabled;
34
- private cursors;
35
- private snapping;
36
- constructor(options?: TerraDrawGreatCircleModeOptions<GreateCircleStyling>);
37
- private close;
38
- /** @internal */
39
- registerBehaviors(config: BehaviorConfig): void;
40
- /** @internal */
41
- start(): void;
42
- /** @internal */
43
- stop(): void;
44
- /** @internal */
45
- onMouseMove(event: TerraDrawMouseEvent): void;
46
- /** @internal */
47
- onClick(event: TerraDrawMouseEvent): void;
48
- /** @internal */
49
- onKeyDown(): void;
50
- /** @internal */
51
- onKeyUp(event: TerraDrawKeyboardEvent): void;
52
- /** @internal */
53
- onDragStart(): void;
54
- /** @internal */
55
- onDrag(): void;
56
- /** @internal */
57
- onDragEnd(): void;
58
- /** @internal */
59
- cleanUp(): void;
60
- /** @internal */
61
- styleFeature(feature: GeoJSONStoreFeatures): TerraDrawAdapterStyling;
62
- validateFeature(feature: unknown): feature is GeoJSONStoreFeatures;
63
- }
64
- export {};