@stadiamaps/ferrostar 0.16.0 → 0.18.0

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/ferrostar.d.ts CHANGED
@@ -28,6 +28,113 @@ export function locationSimulationFromPolyline(polyline: string, precision: numb
28
28
  * @returns {any}
29
29
  */
30
30
  export function advanceLocationSimulation(state: any): any;
31
+ export interface VisualInstruction {
32
+ primaryContent: VisualInstructionContent;
33
+ secondaryContent: VisualInstructionContent | undefined;
34
+ triggerDistanceBeforeManeuver: number;
35
+ }
36
+
37
+ export interface VisualInstructionContent {
38
+ text: string;
39
+ maneuverType: ManeuverType | undefined;
40
+ maneuverModifier: ManeuverModifier | undefined;
41
+ roundaboutExitDegrees: number | undefined;
42
+ }
43
+
44
+ export type ManeuverModifier = "uturn" | "sharp right" | "right" | "slight right" | "straight" | "slight left" | "left" | "sharp left";
45
+
46
+ export type ManeuverType = "turn" | "new name" | "depart" | "arrive" | "merge" | "on ramp" | "off ramp" | "fork" | "end of road" | "continue" | "roundabout" | "rotary" | "roundabout turn" | "notification" | "exit roundabout" | "exit rotary";
47
+
48
+ export interface SpokenInstruction {
49
+ text: string;
50
+ ssml: string | undefined;
51
+ triggerDistanceBeforeManeuver: number;
52
+ utteranceId: string;
53
+ }
54
+
55
+ export interface RouteStep {
56
+ geometry: GeographicCoordinate[];
57
+ distance: number;
58
+ duration: number;
59
+ roadName: string | undefined;
60
+ instruction: string;
61
+ visualInstructions: VisualInstruction[];
62
+ spokenInstructions: SpokenInstruction[];
63
+ annotations: string[] | undefined;
64
+ }
65
+
66
+ export interface Route {
67
+ geometry: GeographicCoordinate[];
68
+ bbox: BoundingBox;
69
+ distance: number;
70
+ waypoints: Waypoint[];
71
+ steps: RouteStep[];
72
+ }
73
+
74
+ export interface UserLocation {
75
+ coordinates: GeographicCoordinate;
76
+ horizontalAccuracy: number;
77
+ courseOverGround: CourseOverGround | undefined;
78
+ timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
79
+ speed: Speed | undefined;
80
+ }
81
+
82
+ export interface Speed {
83
+ value: number;
84
+ accuracy: number | undefined;
85
+ }
86
+
87
+ export interface CourseOverGround {
88
+ degrees: number;
89
+ accuracy: number | undefined;
90
+ }
91
+
92
+ export interface BoundingBox {
93
+ sw: GeographicCoordinate;
94
+ ne: GeographicCoordinate;
95
+ }
96
+
97
+ export type WaypointKind = "Break" | "Via";
98
+
99
+ export interface Waypoint {
100
+ coordinate: GeographicCoordinate;
101
+ kind: WaypointKind;
102
+ }
103
+
104
+ export interface GeographicCoordinate {
105
+ lat: number;
106
+ lng: number;
107
+ }
108
+
109
+ export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
110
+
111
+ export interface LocationSimulationState {
112
+ current_location: UserLocation;
113
+ remaining_locations: GeographicCoordinate[];
114
+ }
115
+
116
+ export interface NavigationControllerConfig {
117
+ stepAdvance: StepAdvanceMode;
118
+ routeDeviationTracking: RouteDeviationTracking;
119
+ snappedLocationCourseFiltering: CourseFiltering;
120
+ }
121
+
122
+ export type StepAdvanceMode = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { RelativeLineStringDistance: { minimumHorizontalAccuracy: number; automaticAdvanceDistance: number | undefined } };
123
+
124
+ export type CourseFiltering = "SnapToRoute" | "Raw";
125
+
126
+ export type TripState = "Idle" | { Navigating: { currentStepGeometryIndex: number | undefined; snappedUserLocation: UserLocation; remainingSteps: RouteStep[]; remainingWaypoints: Waypoint[]; progress: TripProgress; deviation: RouteDeviation; visualInstruction: VisualInstruction | undefined; spokenInstruction: SpokenInstruction | undefined; annotationJson: string | undefined } } | "Complete";
127
+
128
+ export interface TripProgress {
129
+ distanceToNextManeuver: number;
130
+ distanceRemaining: number;
131
+ durationRemaining: number;
132
+ }
133
+
134
+ export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
135
+
136
+ export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
137
+
31
138
  /**
32
139
  * JavaScript wrapper for `NavigationController`.
33
140
  */
package/ferrostar_bg.js CHANGED
@@ -530,13 +530,13 @@ export function __wbindgen_is_object(arg0) {
530
530
  return ret;
531
531
  };
532
532
 
533
- export function __wbindgen_string_new(arg0, arg1) {
534
- const ret = getStringFromWasm0(arg0, arg1);
533
+ export function __wbindgen_error_new(arg0, arg1) {
534
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
535
535
  return addHeapObject(ret);
536
536
  };
537
537
 
538
- export function __wbindgen_error_new(arg0, arg1) {
539
- const ret = new Error(getStringFromWasm0(arg0, arg1));
538
+ export function __wbindgen_string_new(arg0, arg1) {
539
+ const ret = getStringFromWasm0(arg0, arg1);
540
540
  return addHeapObject(ret);
541
541
  };
542
542
 
package/ferrostar_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "Luke Seelenbinder <luke@stadiamaps.com>"
8
8
  ],
9
9
  "description": "The core of modern turn-by-turn navigation.",
10
- "version": "0.16.0",
10
+ "version": "0.18.0",
11
11
  "license": "BSD-3-Clause",
12
12
  "repository": {
13
13
  "type": "git",