@mappedin/mappedin-js 5.9.1 → 5.10.1

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,243 +0,0 @@
1
- // Generated by dts-bundle v0.7.3
2
-
3
- declare module '@mappedin/mappedin-js/lib/esm/navigator' {
4
- import NavigationGraph from '@mappedin/mappedin-js/lib/esm/navigator/navigator/NavigationGraph';
5
- import Navigator from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Navigator';
6
- export { ACTION_TYPE, BEARING_TYPE } from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Directive';
7
- export { Navigator, NavigationGraph };
8
- export type { IDirectionsResult } from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Navigator';
9
- export { E_MESSAGES } from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Navigator';
10
- }
11
-
12
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/NavigationGraph' {
13
- import Edge from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Edge';
14
- import IMap from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IMap';
15
- import INode from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/INode';
16
- import IVortex from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IVortex';
17
- export function getMapScale(map: IMap): number;
18
- export function getAngle(origin: INode, destination: INode): number;
19
- class NavigationGraph {
20
- edges: {
21
- [propName: string]: Edge[];
22
- };
23
- nodesById: {
24
- [propName: string]: INode;
25
- };
26
- mapsById: {
27
- [propName: string]: IMap;
28
- };
29
- constructor({ nodes, vortexes, maps, showVortexNames, }: {
30
- nodes: INode[];
31
- vortexes: IVortex[];
32
- maps: IMap[];
33
- showVortexNames?: boolean;
34
- });
35
- /**
36
- * aStar takes one or more origin node ids, one or more destination node ids
37
- * and returns an array of nodes that define the shortest path from an origin
38
- * a destination.
39
- *
40
- * @param originIds array - of one or more node ids
41
- * @param destinationNodeIds array - of onr or more node ids
42
- * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
43
- */
44
- aStar(originIds: string[], destinationNodeIds: string[], accessible: boolean): Edge[];
45
- getDistance(origin: INode, destination: INode): number;
46
- getShortestEuclideanDistance(origin: INode, destinations: INode[]): number;
47
- }
48
- export default NavigationGraph;
49
- }
50
-
51
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/Navigator' {
52
- import Directive from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Directive';
53
- import Edge from '@mappedin/mappedin-js/lib/esm/navigator/navigator/Edge';
54
- import ILocation from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/ILocation';
55
- import IMap from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IMap';
56
- import INode from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/INode';
57
- import IVortex from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IVortex';
58
- export enum E_MESSAGES {
59
- NO_VALID_PATH = "No Valid Path Available"
60
- }
61
- export function differenceBetweenAngles(a: any, b: any): number;
62
- export interface IDirectionsResult {
63
- distance: number;
64
- path: INode[];
65
- instructions: Directive[];
66
- }
67
- class Navigator {
68
- constructor({ locations, nodes, vortexes, maps, showVortexNames, }: {
69
- locations: ILocation[];
70
- nodes: INode[];
71
- vortexes: IVortex[];
72
- maps: IMap[];
73
- showVortexNames?: boolean;
74
- });
75
- getClosestLocationInRay(startingEdge: Edge, angleThreshold?: number, distanceThreshold?: number): ILocation | null;
76
- /**
77
- * getDirections takes one or more origin node ids, one or more destination node ids
78
- * and returns a distance, array of directives, and an array of nodes that define the
79
- * path to take.
80
- *
81
- * The returned directives array defines nodes, vortexes, and locations along the path
82
- * along with text directions.
83
- *
84
- * @param originIds array - of one or more node ids
85
- * @param destinationNodeIds array - of onr or more node ids
86
- * @param accessible boolean - optional, if true directions will only take accessible route, defaults to false
87
- * @param departFrom ILocation - optional, id and name of a location to represent start of journey
88
- * @param arriveAt ILocation - optional, id and name of a location to represent end of journey
89
- */
90
- getDirections({ originIds, destinationNodeIds, accessible, departFrom, arriveAt, }: {
91
- originIds: string[];
92
- destinationNodeIds: string[];
93
- accessible: boolean;
94
- departFrom?: ILocation;
95
- arriveAt?: ILocation;
96
- }): IDirectionsResult;
97
- }
98
- export default Navigator;
99
- }
100
-
101
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/Directive' {
102
- import ILocation from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/ILocation';
103
- import IMap from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IMap';
104
- import INode from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/INode';
105
- export enum ACTION_TYPE {
106
- DEPARTURE = "Departure",
107
- TAKEVORTEX = "TakeVortex",
108
- EXITVORTEX = "ExitVortex",
109
- TURN = "Turn",
110
- ARRIVAL = "Arrival"
111
- }
112
- export enum BEARING_TYPE {
113
- STRAIGHT = "Straight",
114
- RIGHT = "Right",
115
- SLIGHTRIGHT = "SlightRight",
116
- LEFT = "Left",
117
- SLIGHTLEFT = "SlightLeft"
118
- }
119
- export enum VORTEX_DIRECTION_TYPE {
120
- UP = "up",
121
- DOWN = "down",
122
- NONE = "none"
123
- }
124
- interface IActionDeparture {
125
- type: ACTION_TYPE.DEPARTURE;
126
- }
127
- interface IActionArrival {
128
- type: ACTION_TYPE.ARRIVAL;
129
- }
130
- interface IActionTakeVortex {
131
- type: ACTION_TYPE.TAKEVORTEX;
132
- toMap: IMap;
133
- fromMap: IMap;
134
- direction: VORTEX_DIRECTION_TYPE;
135
- }
136
- interface IActionExitVortex {
137
- type: ACTION_TYPE.EXITVORTEX;
138
- toMap: IMap;
139
- fromMap: IMap;
140
- }
141
- interface IActionTurn {
142
- type: ACTION_TYPE.TURN;
143
- bearing: BEARING_TYPE;
144
- referencePosition?: string;
145
- }
146
- export type IAction = IActionArrival | IActionDeparture | IActionTurn | IActionTakeVortex | IActionExitVortex;
147
- class Directive {
148
- node?: INode;
149
- instruction: string;
150
- action?: IAction;
151
- atLocation?: ILocation;
152
- type?: BEARING_TYPE;
153
- distance: number;
154
- constructor({ origin, action, distance, atLocation, instruction, }: {
155
- origin?: INode;
156
- action?: IAction;
157
- distance?: number;
158
- atLocation?: ILocation;
159
- instruction?: string;
160
- });
161
- }
162
- export default Directive;
163
- }
164
-
165
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/Edge' {
166
- import INode from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/INode';
167
- import IVortex from '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IVortex';
168
- class Edge {
169
- origin: INode;
170
- destination: INode;
171
- vortex?: IVortex;
172
- distance: number;
173
- angle: number;
174
- weight: number;
175
- constructor({ origin, destination, vortex, elevationDelta, distance, angle, }: {
176
- origin: INode;
177
- destination: INode;
178
- vortex?: IVortex;
179
- elevationDelta?: number;
180
- distance?: number;
181
- angle?: number;
182
- });
183
- }
184
- export default Edge;
185
- }
186
-
187
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IMap' {
188
- interface IGeoReference {
189
- target: {
190
- x: number;
191
- y: number;
192
- };
193
- control: {
194
- x: number;
195
- y: number;
196
- };
197
- }
198
- interface IMap {
199
- id: string;
200
- name: string;
201
- shortName: string;
202
- elevation?: number;
203
- scale?: number;
204
- x_scale?: number;
205
- georeference?: IGeoReference[];
206
- [propName: string]: any;
207
- }
208
- export default IMap;
209
- }
210
-
211
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/INode' {
212
- interface INode {
213
- id: string;
214
- x: number;
215
- y: number;
216
- map: string;
217
- externalId?: string;
218
- [propName: string]: any;
219
- }
220
- export default INode;
221
- }
222
-
223
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/IVortex' {
224
- interface IVortex {
225
- id: string;
226
- name: string;
227
- type: string;
228
- weight: number;
229
- multiplier: number;
230
- [propName: string]: any;
231
- }
232
- export default IVortex;
233
- }
234
-
235
- declare module '@mappedin/mappedin-js/lib/esm/navigator/navigator/interfaces/ILocation' {
236
- interface ILocation {
237
- id: string;
238
- name: string;
239
- [propName: string]: any;
240
- }
241
- export default ILocation;
242
- }
243
-
@@ -1 +0,0 @@
1
- import{b}from"./chunk-A74TA65P.js";var d,f,c=b((()=>{f={env:d={NODE_ENV:"production",npm_package_version:"5.9.1"}}}));export{c as a,f as b};