@geospatial-sdk/core 0.0.5-dev.17 → 0.0.5-dev.18

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.
@@ -1,16 +1,22 @@
1
1
  import { Feature } from "geojson";
2
2
  export declare const FeaturesClickEventType = "features-click";
3
3
  export interface FeaturesClickEvent {
4
+ type: typeof FeaturesClickEventType;
4
5
  features: Feature[];
5
6
  }
6
7
  export declare const FeaturesHoverEventType = "features-hover";
7
8
  export interface FeaturesHoverEvent {
9
+ type: typeof FeaturesHoverEventType;
8
10
  features: Feature[];
9
11
  }
10
12
  export declare const MapClickEventType = "map-click";
11
13
  export interface MapClickEvent {
14
+ type: typeof MapClickEventType;
12
15
  coordinate: [number, number];
13
16
  }
14
- export type MapEvent = FeaturesClickEvent | FeaturesHoverEvent | MapClickEvent;
15
- export type MapEventType = typeof FeaturesClickEventType | typeof FeaturesHoverEventType | typeof MapClickEventType;
17
+ export interface MapEventsByType {
18
+ [FeaturesClickEventType]: FeaturesClickEvent;
19
+ [FeaturesHoverEventType]: FeaturesHoverEvent;
20
+ [MapClickEventType]: MapClickEvent;
21
+ }
16
22
  //# sourceMappingURL=events.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../lib/model/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,MAAM,WAAW,aAAa;IAC5B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,MAAM,QAAQ,GAAG,kBAAkB,GAAG,kBAAkB,GAAG,aAAa,CAAC;AAE/E,MAAM,MAAM,YAAY,GACpB,OAAO,sBAAsB,GAC7B,OAAO,sBAAsB,GAC7B,OAAO,iBAAiB,CAAC"}
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../lib/model/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,mBAAmB,CAAC;AACvD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,sBAAsB,CAAC;IACpC,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,cAAc,CAAC;AAC7C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,OAAO,iBAAiB,CAAC;IAC/B,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC9B;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC7C,CAAC,sBAAsB,CAAC,EAAE,kBAAkB,CAAC;IAC7C,CAAC,iBAAiB,CAAC,EAAE,aAAa,CAAC;CACpC"}
@@ -2,22 +2,24 @@ import { Feature } from "geojson";
2
2
 
3
3
  export const FeaturesClickEventType = "features-click";
4
4
  export interface FeaturesClickEvent {
5
+ type: typeof FeaturesClickEventType;
5
6
  features: Feature[];
6
7
  }
7
8
 
8
9
  export const FeaturesHoverEventType = "features-hover";
9
10
  export interface FeaturesHoverEvent {
11
+ type: typeof FeaturesHoverEventType;
10
12
  features: Feature[];
11
13
  }
12
14
 
13
15
  export const MapClickEventType = "map-click";
14
16
  export interface MapClickEvent {
17
+ type: typeof MapClickEventType;
15
18
  coordinate: [number, number]; // expressed in lon/lat
16
19
  }
17
20
 
18
- export type MapEvent = FeaturesClickEvent | FeaturesHoverEvent | MapClickEvent;
19
-
20
- export type MapEventType =
21
- | typeof FeaturesClickEventType
22
- | typeof FeaturesHoverEventType
23
- | typeof MapClickEventType;
21
+ export interface MapEventsByType {
22
+ [FeaturesClickEventType]: FeaturesClickEvent;
23
+ [FeaturesHoverEventType]: FeaturesHoverEvent;
24
+ [MapClickEventType]: MapClickEvent;
25
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geospatial-sdk/core",
3
- "version": "0.0.5-dev.17+e758ce3",
3
+ "version": "0.0.5-dev.18+6f12b0b",
4
4
  "description": "Core functions and models for the SDK",
5
5
  "author": "Olivia <olivia.guyot@camptocamp.com>",
6
6
  "homepage": "",
@@ -22,7 +22,7 @@
22
22
  "test": "vitest",
23
23
  "build": "tsc"
24
24
  },
25
- "gitHead": "e758ce3d88f26443f0680907277ae4fde3c748f9",
25
+ "gitHead": "6f12b0b59e2794a24b27940c9c62dd279e2120e8",
26
26
  "dependencies": {
27
27
  "@camptocamp/ogc-client": "1.1.1-dev.9671ef4",
28
28
  "proj4": "^2.9.2"