@stadiamaps/ferrostar 0.17.0 → 0.19.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,121 @@ 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
+ subContent: VisualInstructionContent | undefined;
35
+ triggerDistanceBeforeManeuver: number;
36
+ }
37
+
38
+ export interface VisualInstructionContent {
39
+ text: string;
40
+ maneuverType: ManeuverType | undefined;
41
+ maneuverModifier: ManeuverModifier | undefined;
42
+ roundaboutExitDegrees: number | undefined;
43
+ laneInfo: LaneInfo[] | undefined;
44
+ }
45
+
46
+ export interface LaneInfo {
47
+ active: boolean;
48
+ directions: string[];
49
+ activeDirection: string | undefined;
50
+ }
51
+
52
+ export type ManeuverModifier = "uturn" | "sharp right" | "right" | "slight right" | "straight" | "slight left" | "left" | "sharp left";
53
+
54
+ 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";
55
+
56
+ export interface SpokenInstruction {
57
+ text: string;
58
+ ssml: string | undefined;
59
+ triggerDistanceBeforeManeuver: number;
60
+ utteranceId: string;
61
+ }
62
+
63
+ export interface RouteStep {
64
+ geometry: GeographicCoordinate[];
65
+ distance: number;
66
+ duration: number;
67
+ roadName: string | undefined;
68
+ instruction: string;
69
+ visualInstructions: VisualInstruction[];
70
+ spokenInstructions: SpokenInstruction[];
71
+ annotations: string[] | undefined;
72
+ }
73
+
74
+ export interface Route {
75
+ geometry: GeographicCoordinate[];
76
+ bbox: BoundingBox;
77
+ distance: number;
78
+ waypoints: Waypoint[];
79
+ steps: RouteStep[];
80
+ }
81
+
82
+ export interface UserLocation {
83
+ coordinates: GeographicCoordinate;
84
+ horizontalAccuracy: number;
85
+ courseOverGround: CourseOverGround | undefined;
86
+ timestamp: { secs_since_epoch: number; nanos_since_epoch: number };
87
+ speed: Speed | undefined;
88
+ }
89
+
90
+ export interface Speed {
91
+ value: number;
92
+ accuracy: number | undefined;
93
+ }
94
+
95
+ export interface CourseOverGround {
96
+ degrees: number;
97
+ accuracy: number | undefined;
98
+ }
99
+
100
+ export interface BoundingBox {
101
+ sw: GeographicCoordinate;
102
+ ne: GeographicCoordinate;
103
+ }
104
+
105
+ export type WaypointKind = "Break" | "Via";
106
+
107
+ export interface Waypoint {
108
+ coordinate: GeographicCoordinate;
109
+ kind: WaypointKind;
110
+ }
111
+
112
+ export interface GeographicCoordinate {
113
+ lat: number;
114
+ lng: number;
115
+ }
116
+
117
+ export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
118
+
119
+ export interface LocationSimulationState {
120
+ current_location: UserLocation;
121
+ remaining_locations: GeographicCoordinate[];
122
+ }
123
+
124
+ export interface NavigationControllerConfig {
125
+ stepAdvance: StepAdvanceMode;
126
+ routeDeviationTracking: RouteDeviationTracking;
127
+ snappedLocationCourseFiltering: CourseFiltering;
128
+ }
129
+
130
+ export type StepAdvanceMode = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { RelativeLineStringDistance: { minimumHorizontalAccuracy: number; automaticAdvanceDistance: number | undefined } };
131
+
132
+ export type CourseFiltering = "SnapToRoute" | "Raw";
133
+
134
+ 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";
135
+
136
+ export interface TripProgress {
137
+ distanceToNextManeuver: number;
138
+ distanceRemaining: number;
139
+ durationRemaining: number;
140
+ }
141
+
142
+ export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
143
+
144
+ export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
145
+
31
146
  /**
32
147
  * JavaScript wrapper for `NavigationController`.
33
148
  */
package/ferrostar_bg.js CHANGED
@@ -510,6 +510,12 @@ export function __wbindgen_jsval_eq(arg0, arg1) {
510
510
  return ret;
511
511
  };
512
512
 
513
+ export function __wbindgen_boolean_get(arg0) {
514
+ const v = getObject(arg0);
515
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
516
+ return ret;
517
+ };
518
+
513
519
  export function __wbindgen_is_string(arg0) {
514
520
  const ret = typeof(getObject(arg0)) === 'string';
515
521
  return ret;
@@ -550,12 +556,6 @@ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
550
556
  return ret;
551
557
  };
552
558
 
553
- export function __wbindgen_boolean_get(arg0) {
554
- const v = getObject(arg0);
555
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
556
- return ret;
557
- };
558
-
559
559
  export function __wbindgen_as_number(arg0) {
560
560
  const ret = +getObject(arg0);
561
561
  return ret;
@@ -618,14 +618,14 @@ export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
618
618
  return addHeapObject(ret);
619
619
  };
620
620
 
621
- export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
622
- getObject(arg0).randomFillSync(takeObject(arg1));
623
- }, arguments) };
624
-
625
621
  export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
626
622
  getObject(arg0).getRandomValues(getObject(arg1));
627
623
  }, arguments) };
628
624
 
625
+ export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
626
+ getObject(arg0).randomFillSync(takeObject(arg1));
627
+ }, arguments) };
628
+
629
629
  export function __wbg_get_3baa728f9d58d3f6(arg0, arg1) {
630
630
  const ret = getObject(arg0)[arg1 >>> 0];
631
631
  return addHeapObject(ret);
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.17.0",
10
+ "version": "0.19.0",
11
11
  "license": "BSD-3-Clause",
12
12
  "repository": {
13
13
  "type": "git",