@opentripplanner/types 1.2.2 → 3.0.0-alpha.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.
package/lib/index.d.ts CHANGED
@@ -3,20 +3,21 @@
3
3
  * used across more than one package in this repo.
4
4
  */
5
5
  import React, { FunctionComponent, ReactElement } from "react";
6
+ declare type ZeroOrOne = 0 | 1;
6
7
  /**
7
8
  * Shape for a transportation company.
8
9
  */
9
- export interface Company {
10
+ export declare type Company = {
10
11
  id: string;
11
12
  label: string;
12
13
  /** a comma-separated string listing the modes that this company has */
13
14
  modes: string;
14
- }
15
+ };
15
16
  /**
16
17
  * Describes some options to help display data about a transit agency that is
17
18
  * configured in an opentripplanner instance.
18
19
  */
19
- export interface TransitOperator {
20
+ export declare type TransitOperator = {
20
21
  agencyId: string;
21
22
  defaultRouteColor?: string;
22
23
  defaultRouteTextColor?: string;
@@ -25,30 +26,30 @@ export interface TransitOperator {
25
26
  longNameSplitter?: string;
26
27
  name?: string;
27
28
  order?: number;
28
- }
29
+ };
29
30
  /**
30
31
  * Describes a map entity to be rendered.
31
32
  */
32
- export interface LayerEntity {
33
+ export declare type LayerEntity = {
33
34
  id: string;
34
35
  lat: number;
35
36
  lon: number;
36
- }
37
- interface SymbolComponentBaseProps {
37
+ };
38
+ export declare type SymbolComponentBaseProps = {
38
39
  entity: LayerEntity;
39
40
  zoom: number;
40
- }
41
+ };
41
42
  /**
42
43
  * The symbol-representing component to draw; with the signature
43
44
  * ({ entity: object; zoom: number }) => Element
44
45
  * where entity must have an id attribute and contain coordinates information for placement on the map.
45
46
  */
46
- declare type SymbolComponent = React.ComponentType<SymbolComponentBaseProps>;
47
+ export declare type SymbolComponent = React.ComponentType<SymbolComponentBaseProps>;
47
48
  /**
48
49
  * Defines which symbol to render based on a zoom level; and optionally by entity type.
49
50
  * (Only one symbol is rendered for any zoom level.)
50
51
  */
51
- export interface ZoomBasedSymbol {
52
+ export declare type ZoomBasedSymbol = {
52
53
  /**
53
54
  * A function with the signature (entity: object) => string
54
55
  * that determines the type of an entity.
@@ -75,11 +76,11 @@ export interface ZoomBasedSymbol {
75
76
  symbolByType?: {
76
77
  [name: string]: SymbolComponent;
77
78
  };
78
- }
79
+ };
79
80
  /**
80
81
  * Describes the objects from the real-time vehicle service.
81
82
  */
82
- export interface TransitVehicle {
83
+ export declare type TransitVehicle = {
83
84
  routeShortName?: string;
84
85
  routeLongName?: string;
85
86
  routeType?: string;
@@ -94,7 +95,7 @@ export interface TransitVehicle {
94
95
  lat?: number;
95
96
  lon?: number;
96
97
  heading?: number;
97
- }
98
+ };
98
99
  export declare type VehicleRentalMapOverlaySymbol = {
99
100
  dockStrokeColor?: string;
100
101
  fillColor?: string;
@@ -107,13 +108,14 @@ export declare type VehicleRentalMapOverlaySymbol = {
107
108
  *
108
109
  * Note: this is an incomplete type mapping.
109
110
  */
110
- export interface Config {
111
+ export declare type Config = {
111
112
  companies?: Company[];
112
113
  dateTime: {
113
114
  timeFormat?: string;
114
115
  dateFormat?: string;
115
116
  longDateFormat?: string;
116
117
  };
118
+ modes: ConfiguredModes;
117
119
  map?: {
118
120
  overlays?: {
119
121
  /**
@@ -148,31 +150,31 @@ export interface Config {
148
150
  }[];
149
151
  };
150
152
  transitOperators?: TransitOperator[];
151
- }
152
- interface FeedScopedId {
153
+ };
154
+ declare type FeedScopedId = {
153
155
  agencyId?: string;
154
156
  id?: string;
155
- }
156
- export interface EncodedPolyline {
157
+ };
158
+ export declare type EncodedPolyline = {
157
159
  length: number;
158
160
  points: string;
159
- }
160
- declare type ElevationData = {
161
+ };
162
+ export declare type ElevationData = {
161
163
  first: number;
162
164
  second: number;
163
165
  }[];
164
- export interface Alert {
166
+ export declare type Alert = {
165
167
  alertHeaderText?: string;
166
168
  alertDescriptionText?: string;
167
169
  alertUrl?: string;
168
170
  effectiveStartDate?: number;
169
- }
171
+ };
170
172
  /**
171
173
  * Represents steps in a leg in an itinerary of an OTP plan response. These are
172
174
  * only for non-transit modes.
173
175
  * See documentation here: http://otp-docs.ibi-transit.com/api/json_WalkStep.html
174
176
  */
175
- export interface Step {
177
+ export declare type Step = {
176
178
  absoluteDirection?: string;
177
179
  alerts?: Alert[];
178
180
  area: boolean;
@@ -184,11 +186,11 @@ export interface Step {
184
186
  relativeDirection: string;
185
187
  stayOn: boolean;
186
188
  streetName: string;
187
- }
189
+ };
188
190
  /**
189
191
  * Describe an origin, destination, or intermediate location in an itinerary.
190
192
  */
191
- export interface Place {
193
+ export declare type Place = {
192
194
  address?: string;
193
195
  arrival?: number;
194
196
  bikeShareId?: string;
@@ -203,28 +205,28 @@ export interface Place {
203
205
  stopSequence?: number;
204
206
  vertexType: string;
205
207
  zoneId?: string;
206
- }
208
+ };
207
209
  /**
208
210
  * Holds contact info and lead time for flex transit bookings.
209
211
  * The information is optional and is for reminding the end-user
210
212
  * of any advance reservations required prior to travel.
211
213
  */
212
- export interface FlexBookingInfo {
214
+ export declare type FlexBookingInfo = {
213
215
  contactInfo?: {
214
216
  phoneNumber: string;
215
217
  };
216
218
  latestBookingTime?: {
217
219
  daysPrior: number;
218
220
  };
219
- }
221
+ };
220
222
  /** Dropoff-specific flex booking information */
221
- interface FlexDropOffBookingInfo extends FlexBookingInfo {
223
+ declare type FlexDropOffBookingInfo = {
222
224
  dropOffMessage?: string;
223
- }
225
+ } & FlexBookingInfo;
224
226
  /** Pickup-specific flex booking information */
225
- interface FlexPickupBookingInfo extends FlexBookingInfo {
227
+ declare type FlexPickupBookingInfo = {
226
228
  pickupMessage?: string;
227
- }
229
+ } & FlexBookingInfo;
228
230
  /**
229
231
  * Represents a leg in an itinerary of an OTP plan response. Each leg represents
230
232
  * a portion of the overall itinerary that is done until either reaching the
@@ -232,7 +234,7 @@ interface FlexPickupBookingInfo extends FlexBookingInfo {
232
234
  * documentation here:
233
235
  * http://otp-docs.ibi-transit.com/api/json_Leg.html
234
236
  */
235
- export interface Leg {
237
+ export declare type Leg = {
236
238
  accessibilityScore?: number;
237
239
  agencyBrandingUrl?: string;
238
240
  agencyId?: string;
@@ -240,6 +242,8 @@ export interface Leg {
240
242
  agencyTimeZoneOffset: number;
241
243
  agencyUrl?: string;
242
244
  alerts?: Alert[];
245
+ boardRule?: string;
246
+ alightRule?: string;
243
247
  arrivalDelay: number;
244
248
  averageWait?: number;
245
249
  departureDelay: number;
@@ -285,11 +289,11 @@ export interface Leg {
285
289
  tripBlockId?: string;
286
290
  tripId?: string;
287
291
  walkingBike?: boolean;
288
- }
292
+ };
289
293
  /**
290
294
  * Describes the cost of an itinerary leg.
291
295
  */
292
- interface Money {
296
+ export declare type Money = {
293
297
  cents: number;
294
298
  currency: {
295
299
  defaultFractionDigits: number;
@@ -297,7 +301,7 @@ interface Money {
297
301
  symbol: string;
298
302
  currency: string;
299
303
  };
300
- }
304
+ };
301
305
  /**
302
306
  * Describes a fare id or route to which a fare applies.
303
307
  */
@@ -310,24 +314,26 @@ declare type ApplicableId = string | FeedScopedId;
310
314
  * NOTE: so far the fare includes ONLY a fare encountered on public transit and
311
315
  * not any bike rental or TNC rental fees.
312
316
  */
313
- export interface Fare {
314
- details: {
317
+ export declare type Fare = {
318
+ details?: {
315
319
  [name: string]: {
316
- fareId: ApplicableId;
320
+ fareId?: ApplicableId;
317
321
  price: Money;
318
- routes: ApplicableId[];
322
+ legIndex?: number;
323
+ isTransfer?: boolean;
324
+ routes?: ApplicableId[];
319
325
  }[];
320
326
  };
321
327
  fare?: {
322
328
  [name: string]: Money;
323
329
  };
324
- }
330
+ };
325
331
  /**
326
332
  * Represents an itinerary of an OTP plan response. See detailed documentation
327
333
  * in OTP webservice documentation here:
328
334
  * http://otp-docs.ibi-transit.com/api/json_Itinerary.html
329
335
  */
330
- export interface Itinerary {
336
+ export declare type Itinerary = {
331
337
  duration: number;
332
338
  elevationGained: number;
333
339
  elevationLost: number;
@@ -342,32 +348,271 @@ export interface Itinerary {
342
348
  walkDistance: number;
343
349
  walkLimitExceeded: boolean;
344
350
  walkTime: number;
345
- }
351
+ };
352
+ export declare type ElevationProfile = {
353
+ maxElev: number;
354
+ minElev: number;
355
+ points: number[];
356
+ traversed: number;
357
+ gain: number;
358
+ loss: number;
359
+ };
346
360
  /**
347
361
  * Used to model a location that is used in planning a trip.
348
362
  */
349
- export interface Location {
363
+ export declare type Location = {
350
364
  lat: number;
351
365
  lon: number;
352
- name: string;
366
+ name?: string;
353
367
  /**
354
368
  * This is only used location that a user has saved. Can be either:
355
- * "home" or "work"
369
+ * One of: 'home', 'work', 'stop' or 'recent'
356
370
  */
357
- type?: string;
358
- }
371
+ type?: "home" | "work" | "stop" | "recent" | string;
372
+ category?: string;
373
+ /**
374
+ * This represents the last time that this location was selected in a
375
+ * search
376
+ */
377
+ timestamp?: number;
378
+ main?: string;
379
+ secondary?: string;
380
+ };
381
+ /**
382
+ * Alias for a commonly used basic type
383
+ */
384
+ export declare type LatLngArray = [number, number];
359
385
  /**
360
386
  * Describes a transit stop entity to be rendered on the map.
361
387
  */
362
- export interface StopLayerStop extends LayerEntity {
388
+ export declare type StopLayerStop = LayerEntity & {
363
389
  name: string;
364
- }
390
+ };
391
+ /**
392
+ * This models data about a stop and it's associated routes that is obtained
393
+ * from a transit index API.
394
+ */
395
+ export declare type Stop = {
396
+ /**
397
+ * The stop code if the stop has one
398
+ */
399
+ id: string;
400
+ code?: string;
401
+ color?: string;
402
+ dist?: number;
403
+ lat: number;
404
+ geometries?: {
405
+ geoJson?: GeoJSON.Polygon;
406
+ };
407
+ lon: number;
408
+ name: string;
409
+ routes?: Route[];
410
+ };
411
+ export declare type Agency = {
412
+ id: string;
413
+ name?: string;
414
+ url?: string;
415
+ timezone?: string;
416
+ lang?: string;
417
+ phone?: string;
418
+ fareUrl?: string;
419
+ };
420
+ export declare type Route = {
421
+ agency: Agency;
422
+ agencyId?: string | number;
423
+ agencyName?: string | number;
424
+ shortName: string;
425
+ longName?: string;
426
+ mode?: string;
427
+ id: string;
428
+ type?: number;
429
+ color?: string;
430
+ textColor?: string;
431
+ routeBikesAllowed?: ZeroOrOne;
432
+ bikesAllowed?: ZeroOrOne;
433
+ sortOrder: number;
434
+ eligibilityRestricted?: ZeroOrOne;
435
+ sortOrderSet: boolean;
436
+ };
365
437
  /**
438
+ * Used to help display the time of day within the context of a particular itinerary.
366
439
  * Describes time options, including time format and timezone-related offset.
440
+ * @deprecated
441
+ */
442
+ export declare type TimeOptions = {
443
+ /**
444
+ * A format string template to be used to display a date using moment.js
445
+ */
446
+ format: string;
447
+ offset: number;
448
+ };
449
+ export declare type TransitivePlace = {
450
+ placeId?: string;
451
+ type: string;
452
+ place_name?: string;
453
+ place_lon?: number;
454
+ place_lat?: number;
455
+ };
456
+ export declare type TransitiveJourney = {
457
+ journey_id: string;
458
+ journey_name: string;
459
+ segments: {
460
+ arc?: boolean;
461
+ from: TransitivePlace;
462
+ patterns?: {
463
+ pattern_id: string;
464
+ from_stop_index: number;
465
+ to_stop_index: number;
466
+ }[];
467
+ streetEdges: number[];
468
+ to: TransitivePlace;
469
+ type: string;
470
+ }[];
471
+ };
472
+ export declare type TransitivePattern = {
473
+ pattern_id: string;
474
+ pattern_name: string;
475
+ route_id: string;
476
+ stops: {
477
+ geometry?: string;
478
+ stop_id: string;
479
+ }[];
480
+ };
481
+ export declare type TransitiveRoute = {
482
+ agency_id: string;
483
+ route_id: string;
484
+ route_short_name: string;
485
+ route_long_name: string;
486
+ route_type: number;
487
+ route_color?: string;
488
+ };
489
+ export declare type TransitiveStop = {
490
+ stop_id: string;
491
+ stop_name: string;
492
+ stop_lat: number;
493
+ stop_lon: number;
494
+ };
495
+ export declare type TransitiveStreetEdge = {
496
+ edge_id: number;
497
+ geometry: EncodedPolyline;
498
+ };
499
+ export declare type TransitiveData = {
500
+ journeys: TransitiveJourney[];
501
+ patterns: TransitivePattern[];
502
+ places: TransitivePlace[];
503
+ routes: TransitiveRoute[];
504
+ stops: TransitiveStop[];
505
+ streetEdges: TransitiveStreetEdge[];
506
+ };
507
+ export declare type Station = {
508
+ bikesAvailable?: number;
509
+ id: string;
510
+ isFloatingBike?: boolean;
511
+ isFloatingCar?: boolean;
512
+ isFloatingVehicle?: boolean;
513
+ name?: string;
514
+ networks: string[];
515
+ spacesAvailable?: number;
516
+ x: number;
517
+ y: number;
518
+ };
519
+ export declare type ModeOption = {
520
+ id: string;
521
+ selected?: boolean;
522
+ showTitle?: boolean;
523
+ text: JSX.Element;
524
+ title?: string;
525
+ };
526
+ export declare type ModeSelectorOptions = {
527
+ primary: ModeOption;
528
+ secondary?: ModeOption[];
529
+ tertiary?: ModeOption[];
530
+ };
531
+ export declare type ConfiguredMode = string | {
532
+ mode: string;
533
+ label: string;
534
+ company?: string;
535
+ };
536
+ export declare type ConfiguredModes = {
537
+ transitModes: ConfiguredMode[];
538
+ accessModes: ConfiguredMode[];
539
+ exlcusiveModes: ConfiguredMode[];
540
+ bicycleModes: ConfiguredMode[];
541
+ micromobilityModes: ConfiguredMode[];
542
+ };
543
+ export declare type ConfiguredCompany = {
544
+ /**
545
+ * The id of the company. This is typically in all-caps.
546
+ */
547
+ id: string;
548
+ /**
549
+ * A human readable text value that can be displayed to users.
550
+ */
551
+ label: string;
552
+ /**
553
+ * A comma-separated list of applicable modes of travel that the company
554
+ * offers.
555
+ */
556
+ modes: string;
557
+ };
558
+ /**
559
+ * Depending on the geocoder that is used, more properties than just the `label`
560
+ * property might be provided by the geocoder. For example, with the Pelias
561
+ * geocoder, properties such as `id`, `layer`, `source` are also included.
562
+ */
563
+ export declare type GeocodedFeature = {
564
+ geometry: {
565
+ coordinates: LatLngArray;
566
+ type: string;
567
+ };
568
+ properties: {
569
+ label: string;
570
+ layer?: string;
571
+ source?: string;
572
+ };
573
+ };
574
+ export declare type TncFare = {
575
+ maxTNCFare: number;
576
+ minTNCFare: number;
577
+ tncCurrencyCode: string;
578
+ };
579
+ export declare type UserPosition = {
580
+ coords?: {
581
+ latitude: number;
582
+ longitude: number;
583
+ };
584
+ error?: {
585
+ message: string;
586
+ } | string;
587
+ fetching?: boolean;
588
+ };
589
+ /**
590
+ * Describes a user location such as "home", "work" etc.
591
+ */
592
+ export interface UserLocation extends Location {
593
+ icon?: string;
594
+ id?: string;
595
+ }
596
+ /**
597
+ * Associates a location with a type string.
598
+ */
599
+ export interface UserLocationAndType {
600
+ location: UserLocation;
601
+ type: string;
602
+ }
603
+ /**
604
+ * Parameters for "clear location" event handlers.
605
+ */
606
+ export interface ClearLocationArg {
607
+ locationType: string;
608
+ }
609
+ /**
610
+ * Parameters for location actions/event handlers.
367
611
  */
368
- export interface TimeOptions {
369
- format?: string;
370
- offset?: string;
612
+ export interface MapLocationActionArg {
613
+ location: UserLocation;
614
+ locationType: string;
615
+ reverseGeocode?: boolean;
371
616
  }
372
617
  /**
373
618
  * Supports leg icons for itinerary body and printable itinerary.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,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AED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,YAAY,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,oBAAY,gBAAgB,GAAG,iBAAiB,CAAC;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH;;;GAGG;AACH,oBAAY,YAAY,GAAG,MAAM,CAC/B,MAAM,EACN;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,YAAY,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CACtD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentripplanner/types",
3
- "version": "1.2.2",
3
+ "version": "3.0.0-alpha.1",
4
4
  "description": "TypeScript types used across multiple OTP-UI packages",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
package/src/index.ts CHANGED
@@ -5,21 +5,23 @@
5
5
 
6
6
  import React, { FunctionComponent, ReactElement } from "react";
7
7
 
8
+ type ZeroOrOne = 0 | 1;
9
+
8
10
  /**
9
11
  * Shape for a transportation company.
10
12
  */
11
- export interface Company {
13
+ export type Company = {
12
14
  id: string;
13
15
  label: string;
14
16
  /** a comma-separated string listing the modes that this company has */
15
17
  modes: string;
16
- }
18
+ };
17
19
 
18
20
  /**
19
21
  * Describes some options to help display data about a transit agency that is
20
22
  * configured in an opentripplanner instance.
21
23
  */
22
- export interface TransitOperator {
24
+ export type TransitOperator = {
23
25
  agencyId: string;
24
26
  defaultRouteColor?: string;
25
27
  defaultRouteTextColor?: string;
@@ -28,34 +30,34 @@ export interface TransitOperator {
28
30
  longNameSplitter?: string;
29
31
  name?: string;
30
32
  order?: number;
31
- }
33
+ };
32
34
 
33
35
  /**
34
36
  * Describes a map entity to be rendered.
35
37
  */
36
- export interface LayerEntity {
38
+ export type LayerEntity = {
37
39
  id: string;
38
40
  lat: number;
39
41
  lon: number;
40
- }
42
+ };
41
43
 
42
- interface SymbolComponentBaseProps {
44
+ export type SymbolComponentBaseProps = {
43
45
  entity: LayerEntity;
44
46
  zoom: number;
45
- }
47
+ };
46
48
 
47
49
  /**
48
50
  * The symbol-representing component to draw; with the signature
49
51
  * ({ entity: object; zoom: number }) => Element
50
52
  * where entity must have an id attribute and contain coordinates information for placement on the map.
51
53
  */
52
- type SymbolComponent = React.ComponentType<SymbolComponentBaseProps>;
54
+ export type SymbolComponent = React.ComponentType<SymbolComponentBaseProps>;
53
55
 
54
56
  /**
55
57
  * Defines which symbol to render based on a zoom level; and optionally by entity type.
56
58
  * (Only one symbol is rendered for any zoom level.)
57
59
  */
58
- export interface ZoomBasedSymbol {
60
+ export type ZoomBasedSymbol = {
59
61
  /**
60
62
  * A function with the signature (entity: object) => string
61
63
  * that determines the type of an entity.
@@ -82,12 +84,12 @@ export interface ZoomBasedSymbol {
82
84
  symbolByType?: {
83
85
  [name: string]: SymbolComponent;
84
86
  };
85
- }
87
+ };
86
88
 
87
89
  /**
88
90
  * Describes the objects from the real-time vehicle service.
89
91
  */
90
- export interface TransitVehicle {
92
+ export type TransitVehicle = {
91
93
  routeShortName?: string;
92
94
  routeLongName?: string;
93
95
  routeType?: string;
@@ -105,7 +107,7 @@ export interface TransitVehicle {
105
107
  lat?: number;
106
108
  lon?: number;
107
109
  heading?: number;
108
- }
110
+ };
109
111
 
110
112
  export type VehicleRentalMapOverlaySymbol =
111
113
  | {
@@ -122,13 +124,14 @@ export type VehicleRentalMapOverlaySymbol =
122
124
  *
123
125
  * Note: this is an incomplete type mapping.
124
126
  */
125
- export interface Config {
127
+ export type Config = {
126
128
  companies?: Company[];
127
129
  dateTime: {
128
130
  timeFormat?: string;
129
131
  dateFormat?: string;
130
132
  longDateFormat?: string;
131
133
  };
134
+ modes: ConfiguredModes;
132
135
  // TODO: add full typing
133
136
  map?: {
134
137
  overlays?: {
@@ -164,36 +167,36 @@ export interface Config {
164
167
  }[];
165
168
  };
166
169
  transitOperators?: TransitOperator[];
167
- }
170
+ };
168
171
 
169
- interface FeedScopedId {
172
+ type FeedScopedId = {
170
173
  agencyId?: string;
171
174
  id?: string;
172
- }
175
+ };
173
176
 
174
- export interface EncodedPolyline {
177
+ export type EncodedPolyline = {
175
178
  length: number;
176
179
  points: string;
177
- }
180
+ };
178
181
 
179
- type ElevationData = {
182
+ export type ElevationData = {
180
183
  first: number;
181
184
  second: number;
182
185
  }[];
183
186
 
184
- export interface Alert {
187
+ export type Alert = {
185
188
  alertHeaderText?: string;
186
189
  alertDescriptionText?: string;
187
190
  alertUrl?: string;
188
191
  effectiveStartDate?: number;
189
- }
192
+ };
190
193
 
191
194
  /**
192
195
  * Represents steps in a leg in an itinerary of an OTP plan response. These are
193
196
  * only for non-transit modes.
194
197
  * See documentation here: http://otp-docs.ibi-transit.com/api/json_WalkStep.html
195
198
  */
196
- export interface Step {
199
+ export type Step = {
197
200
  absoluteDirection?: string;
198
201
  alerts?: Alert[];
199
202
  area: boolean;
@@ -205,12 +208,12 @@ export interface Step {
205
208
  relativeDirection: string;
206
209
  stayOn: boolean;
207
210
  streetName: string;
208
- }
211
+ };
209
212
 
210
213
  /**
211
214
  * Describe an origin, destination, or intermediate location in an itinerary.
212
215
  */
213
- export interface Place {
216
+ export type Place = {
214
217
  address?: string;
215
218
  arrival?: number;
216
219
  bikeShareId?: string;
@@ -225,31 +228,31 @@ export interface Place {
225
228
  stopSequence?: number;
226
229
  vertexType: string;
227
230
  zoneId?: string;
228
- }
231
+ };
229
232
 
230
233
  /**
231
234
  * Holds contact info and lead time for flex transit bookings.
232
235
  * The information is optional and is for reminding the end-user
233
236
  * of any advance reservations required prior to travel.
234
237
  */
235
- export interface FlexBookingInfo {
238
+ export type FlexBookingInfo = {
236
239
  contactInfo?: {
237
240
  phoneNumber: string;
238
241
  };
239
242
  latestBookingTime?: {
240
243
  daysPrior: number;
241
244
  };
242
- }
245
+ };
243
246
 
244
247
  /** Dropoff-specific flex booking information */
245
- interface FlexDropOffBookingInfo extends FlexBookingInfo {
248
+ type FlexDropOffBookingInfo = {
246
249
  dropOffMessage?: string;
247
- }
250
+ } & FlexBookingInfo;
248
251
 
249
252
  /** Pickup-specific flex booking information */
250
- interface FlexPickupBookingInfo extends FlexBookingInfo {
253
+ type FlexPickupBookingInfo = {
251
254
  pickupMessage?: string;
252
- }
255
+ } & FlexBookingInfo;
253
256
 
254
257
  /**
255
258
  * Represents a leg in an itinerary of an OTP plan response. Each leg represents
@@ -258,7 +261,7 @@ interface FlexPickupBookingInfo extends FlexBookingInfo {
258
261
  * documentation here:
259
262
  * http://otp-docs.ibi-transit.com/api/json_Leg.html
260
263
  */
261
- export interface Leg {
264
+ export type Leg = {
262
265
  accessibilityScore?: number;
263
266
  agencyBrandingUrl?: string;
264
267
  agencyId?: string;
@@ -266,6 +269,8 @@ export interface Leg {
266
269
  agencyTimeZoneOffset: number;
267
270
  agencyUrl?: string;
268
271
  alerts?: Alert[];
272
+ boardRule?: string;
273
+ alightRule?: string;
269
274
  arrivalDelay: number;
270
275
  averageWait?: number;
271
276
  departureDelay: number;
@@ -311,12 +316,12 @@ export interface Leg {
311
316
  tripBlockId?: string;
312
317
  tripId?: string;
313
318
  walkingBike?: boolean;
314
- }
319
+ };
315
320
 
316
321
  /**
317
322
  * Describes the cost of an itinerary leg.
318
323
  */
319
- interface Money {
324
+ export type Money = {
320
325
  cents: number;
321
326
  currency: {
322
327
  defaultFractionDigits: number;
@@ -324,7 +329,7 @@ interface Money {
324
329
  symbol: string;
325
330
  currency: string;
326
331
  };
327
- }
332
+ };
328
333
 
329
334
  /**
330
335
  * Describes a fare id or route to which a fare applies.
@@ -339,25 +344,27 @@ type ApplicableId = string | FeedScopedId;
339
344
  * NOTE: so far the fare includes ONLY a fare encountered on public transit and
340
345
  * not any bike rental or TNC rental fees.
341
346
  */
342
- export interface Fare {
343
- details: {
347
+ export type Fare = {
348
+ details?: {
344
349
  [name: string]: {
345
- fareId: ApplicableId;
350
+ fareId?: ApplicableId;
346
351
  price: Money;
347
- routes: ApplicableId[];
352
+ legIndex?: number;
353
+ isTransfer?: boolean;
354
+ routes?: ApplicableId[];
348
355
  }[];
349
356
  };
350
357
  fare?: {
351
358
  [name: string]: Money;
352
359
  };
353
- }
360
+ };
354
361
 
355
362
  /**
356
363
  * Represents an itinerary of an OTP plan response. See detailed documentation
357
364
  * in OTP webservice documentation here:
358
365
  * http://otp-docs.ibi-transit.com/api/json_Itinerary.html
359
366
  */
360
- export interface Itinerary {
367
+ export type Itinerary = {
361
368
  duration: number;
362
369
  elevationGained: number;
363
370
  elevationLost: number;
@@ -372,35 +379,301 @@ export interface Itinerary {
372
379
  walkDistance: number;
373
380
  walkLimitExceeded: boolean;
374
381
  walkTime: number;
375
- }
382
+ };
383
+
384
+ export type ElevationProfile = {
385
+ maxElev: number;
386
+ minElev: number;
387
+ points: number[];
388
+ traversed: number;
389
+ gain: number;
390
+ loss: number;
391
+ };
376
392
 
377
393
  /**
378
394
  * Used to model a location that is used in planning a trip.
379
395
  */
380
- export interface Location {
396
+ export type Location = {
381
397
  lat: number;
382
398
  lon: number;
383
- name: string;
399
+ name?: string;
384
400
  /**
385
401
  * This is only used location that a user has saved. Can be either:
386
- * "home" or "work"
402
+ * One of: 'home', 'work', 'stop' or 'recent'
387
403
  */
388
- type?: string;
389
- }
404
+ type?: "home" | "work" | "stop" | "recent" | string;
405
+ category?: string;
406
+
407
+ /**
408
+ * This represents the last time that this location was selected in a
409
+ * search
410
+ */
411
+ timestamp?: number;
412
+
413
+ /* Sometimes used for displaying subinfo */
414
+ main?: string;
415
+ secondary?: string;
416
+ };
417
+
418
+ /**
419
+ * Alias for a commonly used basic type
420
+ */
421
+ export type LatLngArray = [number, number];
390
422
 
391
423
  /**
392
424
  * Describes a transit stop entity to be rendered on the map.
393
425
  */
394
- export interface StopLayerStop extends LayerEntity {
426
+ export type StopLayerStop = LayerEntity & {
395
427
  name: string;
396
- }
428
+ };
397
429
 
398
430
  /**
431
+ * This models data about a stop and it's associated routes that is obtained
432
+ * from a transit index API.
433
+ */
434
+ export type Stop = {
435
+ /**
436
+ * The stop code if the stop has one
437
+ */
438
+ id: string;
439
+ code?: string;
440
+ color?: string;
441
+ dist?: number;
442
+ lat: number;
443
+ geometries?: { geoJson?: GeoJSON.Polygon };
444
+ lon: number;
445
+ name: string;
446
+ routes?: Route[];
447
+ };
448
+
449
+ export type Agency = {
450
+ id: string;
451
+ name?: string;
452
+ url?: string;
453
+ timezone?: string;
454
+ lang?: string;
455
+ phone?: string;
456
+ fareUrl?: string;
457
+ };
458
+ export type Route = {
459
+ agency: Agency;
460
+ agencyId?: string | number;
461
+ agencyName?: string | number;
462
+ shortName: string;
463
+ longName?: string;
464
+ mode?: string;
465
+ id: string;
466
+ // TS TODO: route type enum
467
+ type?: number;
468
+ color?: string;
469
+ textColor?: string;
470
+ routeBikesAllowed?: ZeroOrOne;
471
+ bikesAllowed?: ZeroOrOne;
472
+ sortOrder: number;
473
+ eligibilityRestricted?: ZeroOrOne;
474
+ sortOrderSet: boolean;
475
+ };
476
+
477
+ /**
478
+ * Used to help display the time of day within the context of a particular itinerary.
399
479
  * Describes time options, including time format and timezone-related offset.
480
+ * @deprecated
481
+ */
482
+ export type TimeOptions = {
483
+ /**
484
+ * A format string template to be used to display a date using moment.js
485
+ */
486
+ format: string;
487
+ /*
488
+ * The timezone offset in milliseconds if any should be added. This is
489
+ * typically calculated using the itinerary.js#getTimeZoneOffset function.
490
+ */
491
+ offset: number;
492
+ };
493
+
494
+ export type TransitivePlace = {
495
+ placeId?: string;
496
+ type: string;
497
+ place_name?: string;
498
+ place_lon?: number;
499
+ place_lat?: number;
500
+ };
501
+ export type TransitiveJourney = {
502
+ journey_id: string;
503
+ journey_name: string;
504
+ segments: {
505
+ arc?: boolean;
506
+ from: TransitivePlace;
507
+ patterns?: {
508
+ pattern_id: string;
509
+ from_stop_index: number;
510
+ to_stop_index: number;
511
+ }[];
512
+ streetEdges: number[];
513
+ to: TransitivePlace;
514
+ type: string;
515
+ }[];
516
+ };
517
+ export type TransitivePattern = {
518
+ pattern_id: string;
519
+ pattern_name: string;
520
+ route_id: string;
521
+ stops: {
522
+ geometry?: string;
523
+ stop_id: string;
524
+ }[];
525
+ };
526
+ export type TransitiveRoute = {
527
+ agency_id: string;
528
+ route_id: string;
529
+ route_short_name: string;
530
+ route_long_name: string;
531
+ route_type: number;
532
+ route_color?: string;
533
+ };
534
+ export type TransitiveStop = {
535
+ stop_id: string;
536
+ stop_name: string;
537
+ stop_lat: number;
538
+ stop_lon: number;
539
+ };
540
+
541
+ export type TransitiveStreetEdge = {
542
+ edge_id: number;
543
+ geometry: EncodedPolyline;
544
+ };
545
+
546
+ export type TransitiveData = {
547
+ journeys: TransitiveJourney[];
548
+ patterns: TransitivePattern[];
549
+ places: TransitivePlace[];
550
+ routes: TransitiveRoute[];
551
+ stops: TransitiveStop[];
552
+ streetEdges: TransitiveStreetEdge[];
553
+ };
554
+
555
+ export type Station = {
556
+ bikesAvailable?: number;
557
+ id: string;
558
+ isFloatingBike?: boolean;
559
+ isFloatingCar?: boolean;
560
+ isFloatingVehicle?: boolean;
561
+ name?: string;
562
+ networks: string[];
563
+ spacesAvailable?: number;
564
+ // TS TODO coordinate type
565
+ x: number;
566
+ y: number;
567
+ };
568
+
569
+ export type ModeOption = {
570
+ id: string;
571
+ selected?: boolean;
572
+ showTitle?: boolean;
573
+ text: JSX.Element;
574
+ title?: string;
575
+ };
576
+
577
+ export type ModeSelectorOptions = {
578
+ primary: ModeOption;
579
+ secondary?: ModeOption[];
580
+ tertiary?: ModeOption[];
581
+ };
582
+
583
+ export type ConfiguredMode =
584
+ | string
585
+ | {
586
+ mode: string;
587
+ label: string;
588
+ company?: string;
589
+ };
590
+
591
+ export type ConfiguredModes = {
592
+ transitModes: ConfiguredMode[];
593
+ accessModes: ConfiguredMode[];
594
+ exlcusiveModes: ConfiguredMode[];
595
+ bicycleModes: ConfiguredMode[];
596
+ micromobilityModes: ConfiguredMode[];
597
+ };
598
+
599
+ export type ConfiguredCompany = {
600
+ /**
601
+ * The id of the company. This is typically in all-caps.
602
+ */
603
+ id: string;
604
+ /**
605
+ * A human readable text value that can be displayed to users.
606
+ */
607
+ label: string;
608
+ /**
609
+ * A comma-separated list of applicable modes of travel that the company
610
+ * offers.
611
+ */
612
+ modes: string;
613
+ };
614
+
615
+ /**
616
+ * Depending on the geocoder that is used, more properties than just the `label`
617
+ * property might be provided by the geocoder. For example, with the Pelias
618
+ * geocoder, properties such as `id`, `layer`, `source` are also included.
619
+ */
620
+ export type GeocodedFeature = {
621
+ geometry: {
622
+ coordinates: LatLngArray;
623
+ type: string;
624
+ };
625
+ properties: {
626
+ label: string;
627
+ layer?: string;
628
+ source?: string;
629
+ };
630
+ };
631
+
632
+ export type TncFare = {
633
+ maxTNCFare: number;
634
+ minTNCFare: number;
635
+ tncCurrencyCode: string;
636
+ };
637
+
638
+ export type UserPosition = {
639
+ coords?: {
640
+ latitude: number;
641
+ longitude: number;
642
+ };
643
+ error?: { message: string } | string;
644
+ fetching?: boolean;
645
+ };
646
+
647
+ /**
648
+ * Describes a user location such as "home", "work" etc.
649
+ */
650
+ export interface UserLocation extends Location {
651
+ icon?: string;
652
+ id?: string;
653
+ }
654
+
655
+ /**
656
+ * Associates a location with a type string.
657
+ */
658
+ export interface UserLocationAndType {
659
+ location: UserLocation;
660
+ type: string;
661
+ }
662
+
663
+ /**
664
+ * Parameters for "clear location" event handlers.
665
+ */
666
+ export interface ClearLocationArg {
667
+ locationType: string;
668
+ }
669
+
670
+ /**
671
+ * Parameters for location actions/event handlers.
400
672
  */
401
- export interface TimeOptions {
402
- format?: string;
403
- offset?: string;
673
+ export interface MapLocationActionArg {
674
+ location: UserLocation;
675
+ locationType: string;
676
+ reverseGeocode?: boolean;
404
677
  }
405
678
 
406
679
  /**
@@ -182,8 +182,8 @@
182
182
  "affectsGlobalScope": true
183
183
  },
184
184
  "./src/index.ts": {
185
- "version": "e64bda394d52ba2cacdb75574dd6bd7287e92c413a00f419fea89003ee1f9a36",
186
- "signature": "014cf9afb8b78185825b8a4dda98be807270c3efd950d40c5d8486c9a6b408bb",
185
+ "version": "9330a87d20bdb3ebb2abb3a94b0c8336fabac7c76f8a8963b29f25feef1df05e",
186
+ "signature": "0fa8e07eac37ef7aa4b3736dd0a99c57e534d552a6ea6a287a4194f8147ff6d1",
187
187
  "affectsGlobalScope": false
188
188
  },
189
189
  "../../node_modules/@babel/types/lib/index.d.ts": {
@@ -241,16 +241,16 @@
241
241
  "signature": "117ffeecf6c55e25b6446f449ad079029b5e7317399b0a693858faaaea5ca73e",
242
242
  "affectsGlobalScope": false
243
243
  },
244
+ "../../node_modules/@types/estree/index.d.ts": {
245
+ "version": "7d7c8ef7d48a035142c07dae60545ecc0e4af4c337742760cb09726f2f8e31db",
246
+ "signature": "7d7c8ef7d48a035142c07dae60545ecc0e4af4c337742760cb09726f2f8e31db",
247
+ "affectsGlobalScope": false
248
+ },
244
249
  "../../node_modules/@types/flat/index.d.ts": {
245
250
  "version": "d9890ea8f1da57be3c2e2d3627b787cd4b4a463fd1747c823a0de24b240c8fe5",
246
251
  "signature": "d9890ea8f1da57be3c2e2d3627b787cd4b4a463fd1747c823a0de24b240c8fe5",
247
252
  "affectsGlobalScope": false
248
253
  },
249
- "../../node_modules/@types/geojson/index.d.ts": {
250
- "version": "8c2e6e491e1a08855b8bf70820184ff66ae0d43f7cf0311fc680e6d860af211c",
251
- "signature": "8c2e6e491e1a08855b8bf70820184ff66ae0d43f7cf0311fc680e6d860af211c",
252
- "affectsGlobalScope": false
253
- },
254
254
  "../../node_modules/@types/node/assert/strict.d.ts": {
255
255
  "version": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",
256
256
  "signature": "c7bdc99177a2a94d25fb13722adaaf5b3291bf70b4d1b27584ba189dd3889ba3",
@@ -511,6 +511,16 @@
511
511
  "signature": "30368d3789ec56ef3006c5f2115bd00faa21471aed6cbe6fec54a5683e5497ed",
512
512
  "affectsGlobalScope": false
513
513
  },
514
+ "../../node_modules/@types/fs-extra/index.d.ts": {
515
+ "version": "ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae",
516
+ "signature": "ed19da84b7dbf00952ad0b98ce5c194f1903bcf7c94d8103e8e0d63b271543ae",
517
+ "affectsGlobalScope": false
518
+ },
519
+ "../../node_modules/@types/geojson/index.d.ts": {
520
+ "version": "8c2e6e491e1a08855b8bf70820184ff66ae0d43f7cf0311fc680e6d860af211c",
521
+ "signature": "8c2e6e491e1a08855b8bf70820184ff66ae0d43f7cf0311fc680e6d860af211c",
522
+ "affectsGlobalScope": false
523
+ },
514
524
  "../../node_modules/@types/minimatch/index.d.ts": {
515
525
  "version": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2",
516
526
  "signature": "95c22bc19835e28e2e524a4bb8898eb5f2107b640d7279a6d3aade261916bbf2",
@@ -1076,11 +1086,36 @@
1076
1086
  "signature": "3a1e165b22a1cb8df82c44c9a09502fd2b33f160cd277de2cd3a055d8e5c6b27",
1077
1087
  "affectsGlobalScope": false
1078
1088
  },
1089
+ "../../node_modules/@types/json-stable-stringify/index.d.ts": {
1090
+ "version": "13cc3979e1f548aacaa23911f2d6e69c1a2999266c4a1952806de1e9593bdaaa",
1091
+ "signature": "13cc3979e1f548aacaa23911f2d6e69c1a2999266c4a1952806de1e9593bdaaa",
1092
+ "affectsGlobalScope": false
1093
+ },
1079
1094
  "../../node_modules/@types/json5/index.d.ts": {
1080
1095
  "version": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538",
1081
1096
  "signature": "96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538",
1082
1097
  "affectsGlobalScope": false
1083
1098
  },
1099
+ "../../node_modules/@types/mapbox-gl/index.d.ts": {
1100
+ "version": "a49c26a7bad73494e987a795709e298223800407fa4e5c40c28539f752eb32ad",
1101
+ "signature": "a49c26a7bad73494e987a795709e298223800407fa4e5c40c28539f752eb32ad",
1102
+ "affectsGlobalScope": false
1103
+ },
1104
+ "../../node_modules/@types/mapbox__point-geometry/index.d.ts": {
1105
+ "version": "e86cd9c6c99834f8591ed72f08e4ca31570296f081206d0168f58f032cec5b58",
1106
+ "signature": "e86cd9c6c99834f8591ed72f08e4ca31570296f081206d0168f58f032cec5b58",
1107
+ "affectsGlobalScope": false
1108
+ },
1109
+ "../../node_modules/@types/pbf/index.d.ts": {
1110
+ "version": "2a856615ecd0af49997dfbb38cf94fd787d529062a2e96ce26b84432e61d785d",
1111
+ "signature": "2a856615ecd0af49997dfbb38cf94fd787d529062a2e96ce26b84432e61d785d",
1112
+ "affectsGlobalScope": false
1113
+ },
1114
+ "../../node_modules/@types/mapbox__vector-tile/index.d.ts": {
1115
+ "version": "ab438f22fa7748112b6b9744b992ab6049d2fa6f46f011c145ff9c90e533856a",
1116
+ "signature": "ab438f22fa7748112b6b9744b992ab6049d2fa6f46f011c145ff9c90e533856a",
1117
+ "affectsGlobalScope": false
1118
+ },
1084
1119
  "../../node_modules/@types/mdast/index.d.ts": {
1085
1120
  "version": "9a6d65d77455efaaaeff945bea30c38b8fe0922b807ba45cd23792392f1bfe76",
1086
1121
  "signature": "9a6d65d77455efaaaeff945bea30c38b8fe0922b807ba45cd23792392f1bfe76",
@@ -1354,6 +1389,10 @@
1354
1389
  "../../node_modules/@types/color-convert/route.d.ts": [
1355
1390
  "../../node_modules/@types/color-convert/conversions.d.ts"
1356
1391
  ],
1392
+ "../../node_modules/@types/fs-extra/index.d.ts": [
1393
+ "../../node_modules/@types/node/fs.d.ts",
1394
+ "../../node_modules/@types/node/index.d.ts"
1395
+ ],
1357
1396
  "../../node_modules/@types/glob/index.d.ts": [
1358
1397
  "../../node_modules/@types/minimatch/index.d.ts",
1359
1398
  "../../node_modules/@types/node/events.d.ts",
@@ -1513,6 +1552,14 @@
1513
1552
  "../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts": [
1514
1553
  "../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts"
1515
1554
  ],
1555
+ "../../node_modules/@types/mapbox-gl/index.d.ts": [
1556
+ "../../node_modules/@types/geojson/index.d.ts"
1557
+ ],
1558
+ "../../node_modules/@types/mapbox__vector-tile/index.d.ts": [
1559
+ "../../node_modules/@types/geojson/index.d.ts",
1560
+ "../../node_modules/@types/mapbox__point-geometry/index.d.ts",
1561
+ "../../node_modules/@types/pbf/index.d.ts"
1562
+ ],
1516
1563
  "../../node_modules/@types/mdast/index.d.ts": [
1517
1564
  "../../node_modules/@types/unist/index.d.ts"
1518
1565
  ],
@@ -2201,6 +2248,10 @@
2201
2248
  "../../node_modules/@types/color-convert/route.d.ts": [
2202
2249
  "../../node_modules/@types/color-convert/conversions.d.ts"
2203
2250
  ],
2251
+ "../../node_modules/@types/fs-extra/index.d.ts": [
2252
+ "../../node_modules/@types/node/fs.d.ts",
2253
+ "../../node_modules/@types/node/index.d.ts"
2254
+ ],
2204
2255
  "../../node_modules/@types/glob/index.d.ts": [
2205
2256
  "../../node_modules/@types/minimatch/index.d.ts",
2206
2257
  "../../node_modules/@types/node/events.d.ts",
@@ -2360,6 +2411,14 @@
2360
2411
  "../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts": [
2361
2412
  "../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts"
2362
2413
  ],
2414
+ "../../node_modules/@types/mapbox-gl/index.d.ts": [
2415
+ "../../node_modules/@types/geojson/index.d.ts"
2416
+ ],
2417
+ "../../node_modules/@types/mapbox__vector-tile/index.d.ts": [
2418
+ "../../node_modules/@types/geojson/index.d.ts",
2419
+ "../../node_modules/@types/mapbox__point-geometry/index.d.ts",
2420
+ "../../node_modules/@types/pbf/index.d.ts"
2421
+ ],
2363
2422
  "../../node_modules/@types/mdast/index.d.ts": [
2364
2423
  "../../node_modules/@types/unist/index.d.ts"
2365
2424
  ],
@@ -3029,7 +3088,9 @@
3029
3088
  "../../node_modules/@types/color-convert/route.d.ts",
3030
3089
  "../../node_modules/@types/color-name/index.d.ts",
3031
3090
  "../../node_modules/@types/cookie/index.d.ts",
3091
+ "../../node_modules/@types/estree/index.d.ts",
3032
3092
  "../../node_modules/@types/flat/index.d.ts",
3093
+ "../../node_modules/@types/fs-extra/index.d.ts",
3033
3094
  "../../node_modules/@types/geojson/index.d.ts",
3034
3095
  "../../node_modules/@types/glob/index.d.ts",
3035
3096
  "../../node_modules/@types/graceful-fs/index.d.ts",
@@ -3069,7 +3130,11 @@
3069
3130
  "../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts",
3070
3131
  "../../node_modules/@types/js-levenshtein/index.d.ts",
3071
3132
  "../../node_modules/@types/json-schema/index.d.ts",
3133
+ "../../node_modules/@types/json-stable-stringify/index.d.ts",
3072
3134
  "../../node_modules/@types/json5/index.d.ts",
3135
+ "../../node_modules/@types/mapbox-gl/index.d.ts",
3136
+ "../../node_modules/@types/mapbox__point-geometry/index.d.ts",
3137
+ "../../node_modules/@types/mapbox__vector-tile/index.d.ts",
3073
3138
  "../../node_modules/@types/mdast/index.d.ts",
3074
3139
  "../../node_modules/@types/minimatch/index.d.ts",
3075
3140
  "../../node_modules/@types/minimist/index.d.ts",
@@ -3133,6 +3198,7 @@
3133
3198
  "../../node_modules/@types/overlayscrollbars/index.d.ts",
3134
3199
  "../../node_modules/@types/parse-json/index.d.ts",
3135
3200
  "../../node_modules/@types/parse5/index.d.ts",
3201
+ "../../node_modules/@types/pbf/index.d.ts",
3136
3202
  "../../node_modules/@types/pixelmatch/index.d.ts",
3137
3203
  "../../node_modules/@types/prettier/index.d.ts",
3138
3204
  "../../node_modules/@types/pretty-hrtime/index.d.ts",