@skyvexsoftware/stratos-sdk 0.5.3 → 0.5.4

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.
@@ -17,6 +17,8 @@ export declare const trackingSessionKeys: {
17
17
  type UseTrackingSessionReturn = {
18
18
  isTracking: boolean;
19
19
  isPaused: boolean;
20
+ /** True when the flight was paused due to simulator disconnection. */
21
+ simDisconnected: boolean;
20
22
  currentFlight: CurrentFlight | null;
21
23
  pendingRecovery: RecoverableFlight | null;
22
24
  elapsedTime: number;
@@ -51,6 +51,7 @@ export function useTrackingSession() {
51
51
  queryClient.setQueryData(trackingSessionKeys.state, {
52
52
  flight: payload.flight,
53
53
  pendingRecovery: payload.pendingRecovery,
54
+ simDisconnected: payload.simDisconnected,
54
55
  });
55
56
  };
56
57
  // Refetch on socket connect — catches flights started before the UI loaded
@@ -66,6 +67,7 @@ export function useTrackingSession() {
66
67
  }, [socket, queryClient, refetch]);
67
68
  const currentFlight = stateData?.flight ?? null;
68
69
  const pendingRecovery = stateData?.pendingRecovery ?? null;
70
+ const simDisconnected = stateData?.simDisconnected ?? false;
69
71
  const startFlight = useCallback(async (plan, options) => {
70
72
  const result = await api("/start", "POST", { flightPlan: plan, options });
71
73
  return result.data;
@@ -140,6 +142,7 @@ export function useTrackingSession() {
140
142
  return {
141
143
  isTracking: isActive,
142
144
  isPaused: flight?.status === "paused",
145
+ simDisconnected,
143
146
  currentFlight: flight,
144
147
  pendingRecovery,
145
148
  elapsedTime,
@@ -97,6 +97,8 @@ export type RecoverableFlight = {
97
97
  export type FlightManagerPayload = {
98
98
  flight: CurrentFlight | null;
99
99
  pendingRecovery: RecoverableFlight | null;
100
+ /** True when the flight was paused due to simulator disconnection. */
101
+ simDisconnected: boolean;
100
102
  timestamp: number;
101
103
  };
102
104
  /** Result returned from startFlight */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvexsoftware/stratos-sdk",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "description": "Plugin SDK for Stratos — types, hooks, and UI components",
5
5
  "author": {
6
6
  "name": "Skyvex Software",