@skyvexsoftware/stratos-sdk 0.12.0 → 0.13.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/dist/helpers/aircraft.d.ts +6 -0
- package/dist/helpers/aircraft.js +3 -3
- package/dist/helpers/units.d.ts +9 -0
- package/dist/helpers/units.js +5 -0
- package/dist/hooks/context.d.ts +1 -1
- package/dist/hooks/useFlightEvents.d.ts +1 -1
- package/dist/hooks/useLandingAnalysis.d.ts +1 -1
- package/dist/index.d.ts +9 -3
- package/dist/index.js +2 -1
- package/dist/shared-types/additional-fields.d.ts +5 -0
- package/dist/shared-types/additional-fields.js +5 -0
- package/dist/shared-types/flight-events.d.ts +55 -0
- package/dist/shared-types/flight-events.js +15 -0
- package/dist/shared-types/flight-manager.d.ts +12 -0
- package/dist/shared-types/flight-manager.js +7 -0
- package/dist/shared-types/index.d.ts +6 -2
- package/dist/shared-types/index.js +2 -1
- package/dist/shared-types/landing.d.ts +149 -0
- package/dist/shared-types/landing.js +5 -0
- package/dist/shared-types/plugin-dialogs.d.ts +56 -0
- package/dist/shared-types/plugin-dialogs.js +6 -0
- package/dist/shared-types/simulator.d.ts +2 -194
- package/dist/shared-types/simulator.js +2 -13
- package/dist/shared-types/socket-events.d.ts +9 -0
- package/dist/shared-types/socket-events.js +6 -28
- package/dist/shared-types/theme.d.ts +6 -1
- package/dist/shared-types/theme.js +5 -0
- package/dist/types/context-ui.d.ts +101 -0
- package/dist/types/context-ui.js +5 -0
- package/dist/types/context.d.ts +100 -173
- package/dist/types/context.js +4 -3
- package/dist/types/index.d.ts +2 -1
- package/dist/types/manifest.d.ts +5 -3
- package/dist/types/manifest.js +3 -1
- package/dist/types/module.d.ts +4 -2
- package/dist/types/module.js +3 -1
- package/dist/types/settings.d.ts +81 -0
- package/dist/types/settings.js +6 -0
- package/dist/ui/badge.d.ts +2 -0
- package/dist/ui/button.d.ts +6 -0
- package/dist/ui/button.js +5 -0
- package/dist/ui/combobox.d.ts +3 -0
- package/dist/ui/combobox.js +1 -0
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @page Simulator Data
|
|
3
|
+
* Standardized flight data, phase detection, and trend types shared across all simulators.
|
|
3
4
|
*
|
|
4
5
|
* These are the canonical definitions of flight data structures.
|
|
5
6
|
* Comprehensive flight data variables for VA platform compatibility.
|
|
@@ -207,184 +208,6 @@ export type FlightPhasePayload = {
|
|
|
207
208
|
};
|
|
208
209
|
/** Simulator connection status */
|
|
209
210
|
export type SimulatorStatus = "disconnected" | "connecting" | "connected" | "error";
|
|
210
|
-
/** Event categories for filtering/display */
|
|
211
|
-
export declare enum EventCategory {
|
|
212
|
-
SYSTEM = "system",
|
|
213
|
-
PHASE = "phase",
|
|
214
|
-
CONTROLS = "controls",
|
|
215
|
-
ENGINE = "engine",
|
|
216
|
-
WARNING = "warning",
|
|
217
|
-
POSITION = "position",
|
|
218
|
-
COMMENT = "comment"
|
|
219
|
-
}
|
|
220
|
-
/** Flight log event entry */
|
|
221
|
-
export type FlightLogEvent = {
|
|
222
|
-
eventId: string;
|
|
223
|
-
eventTimestamp: string;
|
|
224
|
-
eventElapsedTime: number;
|
|
225
|
-
eventCondition: string;
|
|
226
|
-
category: EventCategory;
|
|
227
|
-
message: string;
|
|
228
|
-
data?: Record<string, unknown>;
|
|
229
|
-
};
|
|
230
|
-
/** History report entry (position sample) */
|
|
231
|
-
export type HistoryReportEntry = {
|
|
232
|
-
timestamp: number;
|
|
233
|
-
elapsedTime: number;
|
|
234
|
-
latitude: number;
|
|
235
|
-
longitude: number;
|
|
236
|
-
altitude: number;
|
|
237
|
-
altitudeAgl: number;
|
|
238
|
-
heading: number;
|
|
239
|
-
groundSpeed: number;
|
|
240
|
-
indicatedAirspeed: number;
|
|
241
|
-
verticalSpeed: number;
|
|
242
|
-
pitch: number;
|
|
243
|
-
bank: number;
|
|
244
|
-
phase: FlightPhase;
|
|
245
|
-
planeOnground: boolean;
|
|
246
|
-
landingRate: number | null;
|
|
247
|
-
};
|
|
248
|
-
/** Payload for the flight:event Socket.io event */
|
|
249
|
-
export type FlightEventPayload = {
|
|
250
|
-
event: FlightLogEvent;
|
|
251
|
-
timestamp: number;
|
|
252
|
-
};
|
|
253
|
-
/** Capture point for landing analysis */
|
|
254
|
-
export type CapturePoint = {
|
|
255
|
-
timestamp: number;
|
|
256
|
-
altitude: number;
|
|
257
|
-
altitudeAgl: number;
|
|
258
|
-
verticalSpeed: number;
|
|
259
|
-
groundSpeed: number;
|
|
260
|
-
indicatedAirspeed: number;
|
|
261
|
-
latitude: number;
|
|
262
|
-
longitude: number;
|
|
263
|
-
pitch: number;
|
|
264
|
-
bank: number;
|
|
265
|
-
gForce: number;
|
|
266
|
-
heading: number;
|
|
267
|
-
glideslopeDeviation: number | null;
|
|
268
|
-
localizerDeviation: number | null;
|
|
269
|
-
flapsControl: number;
|
|
270
|
-
windDirection: number;
|
|
271
|
-
windSpeed: number;
|
|
272
|
-
totalFuelLbs: number;
|
|
273
|
-
/** Snapshot of data.flapsHandleIndex at the capture moment, null if the sim doesn't provide it. */
|
|
274
|
-
flapsHandleIndex: number | null;
|
|
275
|
-
};
|
|
276
|
-
/** Bounce data — captured when aircraft becomes airborne after touchdown */
|
|
277
|
-
export type BounceData = {
|
|
278
|
-
bounceNumber: number;
|
|
279
|
-
timestamp: number;
|
|
280
|
-
maxAltitudeAgl: number;
|
|
281
|
-
touchdownVerticalSpeed: number;
|
|
282
|
-
touchdownGForce: number;
|
|
283
|
-
durationMs: number;
|
|
284
|
-
};
|
|
285
|
-
/** Snapshot of aircraft state at the 50 ft stabilized-approach gate */
|
|
286
|
-
export type GateCapture = {
|
|
287
|
-
/** Actual AGL at capture, may be a few ft above/below the nominal 50 ft */
|
|
288
|
-
altitudeAgl: number;
|
|
289
|
-
indicatedAirspeed: number;
|
|
290
|
-
verticalSpeed: number;
|
|
291
|
-
bank: number;
|
|
292
|
-
pitch: number;
|
|
293
|
-
groundSpeed: number;
|
|
294
|
-
timestamp: number;
|
|
295
|
-
};
|
|
296
|
-
/** Complete landing analysis result */
|
|
297
|
-
export type LandingAnalysis = {
|
|
298
|
-
landingRateFpm: number;
|
|
299
|
-
simulatorVsAtTouchdown: number;
|
|
300
|
-
touchdownTimestamp: number;
|
|
301
|
-
touchdownLatitude: number;
|
|
302
|
-
touchdownLongitude: number;
|
|
303
|
-
touchdownHeading: number;
|
|
304
|
-
touchdownGroundSpeed: number;
|
|
305
|
-
/** Indicated airspeed at touchdown (knots) — sourced from the touchdown CapturePoint. */
|
|
306
|
-
touchdownIas: number;
|
|
307
|
-
/** Flaps handle index at touchdown, null if the sim doesn't provide one. */
|
|
308
|
-
touchdownFlapsIndex: number | null;
|
|
309
|
-
touchdownPitch: number;
|
|
310
|
-
touchdownBank: number;
|
|
311
|
-
/**
|
|
312
|
-
* Scored touchdown vertical-load G. The peak of a framerate-independent,
|
|
313
|
-
* time-constant EMA of per-frame gForce over the contact second — not the
|
|
314
|
-
* raw spike. This is the value scoring reads.
|
|
315
|
-
*/
|
|
316
|
-
touchdownGForce: number;
|
|
317
|
-
/**
|
|
318
|
-
* Forensic raw peak gForce over the same contact window (un-smoothed). Kept
|
|
319
|
-
* for diagnostics; NOT used for scoring. Optional/null when no frame-buffer
|
|
320
|
-
* samples fell in the window (the scored value then came from the instantaneous
|
|
321
|
-
* touchdown-frame G and there is no raw window peak to report).
|
|
322
|
-
*/
|
|
323
|
-
touchdownGForceRaw?: number | null;
|
|
324
|
-
approachAltitude: number;
|
|
325
|
-
approachIas: number;
|
|
326
|
-
approachVs: number;
|
|
327
|
-
approachBank: number;
|
|
328
|
-
approachPitch: number;
|
|
329
|
-
approachTimestamp: number;
|
|
330
|
-
/**
|
|
331
|
-
* Snapshot at ~50 ft AGL on final, used for the stabilized-approach gate.
|
|
332
|
-
* Null when the capture was missed (e.g. very fast descent, sim disconnect
|
|
333
|
-
* right before touchdown, or capture armed below 50 ft).
|
|
334
|
-
*/
|
|
335
|
-
gateCapture: GateCapture | null;
|
|
336
|
-
descentTimeSeconds: number;
|
|
337
|
-
averageDescentRateFpm: number;
|
|
338
|
-
bounceCount: number;
|
|
339
|
-
bounces: BounceData[];
|
|
340
|
-
landingDistanceFt: number;
|
|
341
|
-
captureQuality: "excellent" | "good" | "fair" | "poor";
|
|
342
|
-
captureNotes: string[];
|
|
343
|
-
};
|
|
344
|
-
/** Debug state for the landing analyzer */
|
|
345
|
-
export type LandingAnalyzerDebugState = {
|
|
346
|
-
isArmed: boolean;
|
|
347
|
-
hasCapturedApproach: boolean;
|
|
348
|
-
hasLanded: boolean;
|
|
349
|
-
isLandingSettled: boolean;
|
|
350
|
-
isBouncing: boolean;
|
|
351
|
-
bounceCount: number;
|
|
352
|
-
approachCapture: CapturePoint | null;
|
|
353
|
-
touchdownCapture: CapturePoint | null;
|
|
354
|
-
lastAirborneVs: number;
|
|
355
|
-
sampleCount: number;
|
|
356
|
-
samples: {
|
|
357
|
-
timestamp: number;
|
|
358
|
-
vs: number;
|
|
359
|
-
agl: number;
|
|
360
|
-
aglGear: number;
|
|
361
|
-
}[];
|
|
362
|
-
calculatedLandingRate: number | null;
|
|
363
|
-
landingAnalysis: LandingAnalysis | null;
|
|
364
|
-
};
|
|
365
|
-
/** High-frequency landing frame sample from the LandingFrameBuffer */
|
|
366
|
-
export type LandingSample = {
|
|
367
|
-
timestamp: number;
|
|
368
|
-
onGround: boolean;
|
|
369
|
-
verticalSpeed: number;
|
|
370
|
-
altitudeAgl: number;
|
|
371
|
-
altitudeAglGear: number;
|
|
372
|
-
gForce: number;
|
|
373
|
-
pitch: number;
|
|
374
|
-
bank: number;
|
|
375
|
-
groundSpeed: number;
|
|
376
|
-
latitude: number;
|
|
377
|
-
longitude: number;
|
|
378
|
-
glideslopeDeviation: number | null;
|
|
379
|
-
localizerDeviation: number | null;
|
|
380
|
-
};
|
|
381
|
-
/** Payload for the flight:landing Socket.io event */
|
|
382
|
-
export type FlightLandingPayload = {
|
|
383
|
-
type: "touchdown" | "bounce" | "settled";
|
|
384
|
-
timestamp: number;
|
|
385
|
-
landingAnalysis?: LandingAnalysis;
|
|
386
|
-
bounceData?: BounceData;
|
|
387
|
-
};
|
|
388
211
|
/** Snapshot returned by GET /api/simulator/snapshot for useSimData hydration */
|
|
389
212
|
export type SimDataSnapshot = {
|
|
390
213
|
data: FlightData | null;
|
|
@@ -399,21 +222,6 @@ export type FlightPhaseSnapshot = {
|
|
|
399
222
|
trends: FlightTrends | null;
|
|
400
223
|
isTracking: boolean;
|
|
401
224
|
};
|
|
402
|
-
/** Snapshot returned by GET /api/flight-events for useFlightEvents hydration */
|
|
403
|
-
export type FlightEventsSnapshot = {
|
|
404
|
-
events: FlightLogEvent[];
|
|
405
|
-
isTracking: boolean;
|
|
406
|
-
elapsedTime: number;
|
|
407
|
-
};
|
|
408
|
-
/** Snapshot returned by GET /api/simulator/landing-analysis/snapshot for useLandingAnalysis hydration */
|
|
409
|
-
export type LandingAnalysisSnapshot = {
|
|
410
|
-
landingRate: number | null;
|
|
411
|
-
bounceCount: number;
|
|
412
|
-
touchdowns: BounceData[];
|
|
413
|
-
isOnGround: boolean;
|
|
414
|
-
approachData: CapturePoint | null;
|
|
415
|
-
landingAnalysis: LandingAnalysis | null;
|
|
416
|
-
};
|
|
417
225
|
/** Debug info from the main process FlightStateManager */
|
|
418
226
|
export type FlightStateDebugInfo = {
|
|
419
227
|
trends: FlightTrends;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @page Simulator Data
|
|
3
|
+
* Standardized flight data, phase detection, and trend types shared across all simulators.
|
|
3
4
|
*
|
|
4
5
|
* These are the canonical definitions of flight data structures.
|
|
5
6
|
* Comprehensive flight data variables for VA platform compatibility.
|
|
@@ -33,15 +34,3 @@ export var FlightPhase;
|
|
|
33
34
|
FlightPhase["ARRIVED"] = "arrived";
|
|
34
35
|
FlightPhase["DEBOARDING"] = "deboarding";
|
|
35
36
|
})(FlightPhase || (FlightPhase = {}));
|
|
36
|
-
// ── Flight Event Types ─────────────────────────────────────────────────
|
|
37
|
-
/** Event categories for filtering/display */
|
|
38
|
-
export var EventCategory;
|
|
39
|
-
(function (EventCategory) {
|
|
40
|
-
EventCategory["SYSTEM"] = "system";
|
|
41
|
-
EventCategory["PHASE"] = "phase";
|
|
42
|
-
EventCategory["CONTROLS"] = "controls";
|
|
43
|
-
EventCategory["ENGINE"] = "engine";
|
|
44
|
-
EventCategory["WARNING"] = "warning";
|
|
45
|
-
EventCategory["POSITION"] = "position";
|
|
46
|
-
EventCategory["COMMENT"] = "comment";
|
|
47
|
-
})(EventCategory || (EventCategory = {}));
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page Socket Events
|
|
3
|
+
*
|
|
4
|
+
* The Socket.io event catalog and the payload shapes pushed over it.
|
|
5
|
+
*/
|
|
1
6
|
/**
|
|
2
7
|
* Socket.io Event Catalog — canonical event names and payload types.
|
|
3
8
|
*
|
|
@@ -68,6 +73,10 @@ export declare const SOCKET_EVENTS: {
|
|
|
68
73
|
readonly PLUGIN_LOADED: "plugin:loaded";
|
|
69
74
|
readonly PLUGIN_UNLOADED: "plugin:unloaded";
|
|
70
75
|
readonly PLUGIN_EVENT: "plugin:event";
|
|
76
|
+
/** A background plugin opened a dialog/prompt. Payload: PluginDialogSpec */
|
|
77
|
+
readonly DIALOG_OPEN: "plugin:dialog:open";
|
|
78
|
+
/** A dialog/prompt was settled (answered/cancelled/timed out/unloaded). Payload: PluginDialogClosePayload */
|
|
79
|
+
readonly DIALOG_CLOSE: "plugin:dialog:close";
|
|
71
80
|
};
|
|
72
81
|
/** Union of all event name strings. */
|
|
73
82
|
export type SocketEventName = (typeof SOCKET_EVENTS)[keyof typeof SOCKET_EVENTS];
|
|
@@ -1,33 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Socket
|
|
2
|
+
* @page Socket Events
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* used across the Stratos platform. Both the shell (emitter) and SDK hooks
|
|
6
|
-
* (consumers) import from here so payloads are always in sync.
|
|
7
|
-
*
|
|
8
|
-
* ┌──────────────────────┬──────────────────────────────────────────────┐
|
|
9
|
-
* │ Event │ Payload Type │
|
|
10
|
-
* ├──────────────────────┼──────────────────────────────────────────────┤
|
|
11
|
-
* │ simulator:data │ SimulatorDataPayload │
|
|
12
|
-
* │ simulator:status │ SimulatorStatusPayload │
|
|
13
|
-
* │ flight:phase │ FlightPhasePayload │
|
|
14
|
-
* │ flight:event │ FlightEventPayload │
|
|
15
|
-
* │ flight:landing │ FlightLandingPayload │
|
|
16
|
-
* │ flight:manager │ FlightManagerPayload │
|
|
17
|
-
* │ flight:state │ (reserved for future use) │
|
|
18
|
-
* │ protocol-url │ ProtocolUrlPayload │
|
|
19
|
-
* │ notification │ NotificationPayload │
|
|
20
|
-
* │ system:metrics │ SystemMetricsPayload │
|
|
21
|
-
* │ window:focus │ {} │
|
|
22
|
-
* │ window:blur │ {} │
|
|
23
|
-
* │ window:maximize │ {} │
|
|
24
|
-
* │ window:unmaximize │ {} │
|
|
25
|
-
* │ plugin:loaded │ (plugin-defined) │
|
|
26
|
-
* │ plugin:unloaded │ (plugin-defined) │
|
|
27
|
-
* │ plugin:event │ (plugin-defined) │
|
|
28
|
-
* └──────────────────────┴──────────────────────────────────────────────┘
|
|
29
|
-
*
|
|
30
|
-
* All flight-related events include a `timestamp` field (epoch ms).
|
|
4
|
+
* The Socket.io event catalog and the payload shapes pushed over it.
|
|
31
5
|
*/
|
|
32
6
|
// ── Event Names ──────────────────────────────────────────────────────────
|
|
33
7
|
/** Canonical Socket.io event names shared by shell and SDK. */
|
|
@@ -78,4 +52,8 @@ export const SOCKET_EVENTS = {
|
|
|
78
52
|
PLUGIN_LOADED: "plugin:loaded",
|
|
79
53
|
PLUGIN_UNLOADED: "plugin:unloaded",
|
|
80
54
|
PLUGIN_EVENT: "plugin:event",
|
|
55
|
+
/** A background plugin opened a dialog/prompt. Payload: PluginDialogSpec */
|
|
56
|
+
DIALOG_OPEN: "plugin:dialog:open",
|
|
57
|
+
/** A dialog/prompt was settled (answered/cancelled/timed out/unloaded). Payload: PluginDialogClosePayload */
|
|
58
|
+
DIALOG_CLOSE: "plugin:dialog:close",
|
|
81
59
|
};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @page UI Context
|
|
3
|
+
* The context the shell injects into a plugin's React tree via PluginShellProvider.
|
|
4
|
+
*/
|
|
5
|
+
import type { AxiosInstance } from "axios";
|
|
6
|
+
import type { PluginLogger } from "./context";
|
|
7
|
+
/** Pilot user profile provided by the shell's auth system */
|
|
8
|
+
export type PluginPilotUser = {
|
|
9
|
+
dbID: number;
|
|
10
|
+
pilotID: string;
|
|
11
|
+
firstName: string;
|
|
12
|
+
lastName: string;
|
|
13
|
+
email: string;
|
|
14
|
+
rank: string;
|
|
15
|
+
rankLevel: number;
|
|
16
|
+
rankImage: string;
|
|
17
|
+
avatar: string;
|
|
18
|
+
};
|
|
19
|
+
/** Navigation helper for plugin UI components */
|
|
20
|
+
export type PluginNavigationHelper = {
|
|
21
|
+
/** Navigate to a route within this plugin */
|
|
22
|
+
navigateTo(path: string): void;
|
|
23
|
+
/** Navigate to a route in another plugin */
|
|
24
|
+
navigateToPlugin(pluginId: string, path: string): void;
|
|
25
|
+
/** Navigate to a shell route */
|
|
26
|
+
navigateToShell(path: string): void;
|
|
27
|
+
/** Get the current route path */
|
|
28
|
+
getCurrentPath(): string;
|
|
29
|
+
};
|
|
30
|
+
/** Toast/notification API for plugin UI */
|
|
31
|
+
export type PluginToastAPI = {
|
|
32
|
+
success(message: string): void;
|
|
33
|
+
error(message: string): void;
|
|
34
|
+
info(message: string): void;
|
|
35
|
+
warning(message: string): void;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* UI context available to plugin renderer components via React context.
|
|
39
|
+
* Provides shared hooks and utilities from the shell.
|
|
40
|
+
*/
|
|
41
|
+
export type PluginUIContext = {
|
|
42
|
+
/**
|
|
43
|
+
* Shared axios instance for the bound airline's API, with auto-refresh on
|
|
44
|
+
* 401. Provided by the shell so all plugin UIs and the shell itself share
|
|
45
|
+
* one in-flight refresh promise — concurrent 401s coalesce to a single
|
|
46
|
+
* `POST /api/auth/va/refresh`. Reach this through `useVaApi()`.
|
|
47
|
+
*/
|
|
48
|
+
vaApi: AxiosInstance;
|
|
49
|
+
/** The plugin's unique ID */
|
|
50
|
+
pluginId: string;
|
|
51
|
+
/** Auth state from the shell */
|
|
52
|
+
auth: {
|
|
53
|
+
isAuthenticated: boolean;
|
|
54
|
+
token: string | null;
|
|
55
|
+
user: PluginPilotUser | null;
|
|
56
|
+
};
|
|
57
|
+
/** Current airline info (from Stratos API). Bundled with the VA bearer
|
|
58
|
+
* so plugins can call the airline backend directly. */
|
|
59
|
+
airline?: {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
icao: string;
|
|
63
|
+
logo_light: string;
|
|
64
|
+
logo_dark: string;
|
|
65
|
+
/** Origin of the VA's API (no trailing slash). */
|
|
66
|
+
base_url: string;
|
|
67
|
+
/** Bearer for this airline's API. Null if the VA session has expired. */
|
|
68
|
+
token: string | null;
|
|
69
|
+
} | null;
|
|
70
|
+
/** Config access hooks */
|
|
71
|
+
config: {
|
|
72
|
+
get<T>(key: string): T | undefined;
|
|
73
|
+
get<T>(key: string, defaultValue: T): T;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Real-time bridge between this plugin's background and UI modules.
|
|
77
|
+
*
|
|
78
|
+
* - `on(event, handler)` subscribes to broadcasts the background made via
|
|
79
|
+
* `ctx.ipc.send(event, payload)`. The shell scopes the channel to the
|
|
80
|
+
* current plugin id automatically — pass the leaf event name on both
|
|
81
|
+
* ends. Plugin A's UI cannot receive plugin B's broadcasts.
|
|
82
|
+
* - `off(event, handler)` removes a previously registered handler.
|
|
83
|
+
* - `emit` is intentionally not implemented. Send UI→background traffic
|
|
84
|
+
* through HTTP routes registered via `ctx.server.registerRouter`.
|
|
85
|
+
* - `connected` is always `true` in the renderer; the underlying Electron
|
|
86
|
+
* IPC pipe has no connection lifecycle.
|
|
87
|
+
*/
|
|
88
|
+
socket: {
|
|
89
|
+
connected: boolean;
|
|
90
|
+
emit(event: string, data: unknown): void;
|
|
91
|
+
on(event: string, handler: (data: unknown) => void): void;
|
|
92
|
+
off(event: string, handler: (data: unknown) => void): void;
|
|
93
|
+
};
|
|
94
|
+
/** Navigation utilities */
|
|
95
|
+
navigation: PluginNavigationHelper;
|
|
96
|
+
/** Toast/notification API */
|
|
97
|
+
toast: PluginToastAPI;
|
|
98
|
+
/** Scoped logger for renderer-side logging */
|
|
99
|
+
logger: PluginLogger;
|
|
100
|
+
};
|
|
101
|
+
//# sourceMappingURL=context-ui.d.ts.map
|