@skyvexsoftware/stratos-sdk 0.13.1 → 0.14.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/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export type { PluginAuthor, PluginManifest } from "./types/manifest";
2
- export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginVaApiClient, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginServerRegistrar, PluginFlightAccessor, PluginFlightLogWriter, PluginFlightLogInput, PluginFlightLogPatch, PluginStartGuard, PluginStartContext, PluginStartDecision, PluginNotifier, PluginToastInput, PluginAlertSound, PluginDialogApi, PluginPromptApi, PluginDialogAlertInput, PluginDialogConfirmInput, PluginPromptTextInput, PluginPromptNumberInput, PluginPromptSelectInput, } from "./types/context";
2
+ export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginVaApiClient, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginServerRegistrar, PluginFlightAccessor, PluginFlightLogWriter, PluginFlightLogInput, PluginFlightLogPatch, PluginStartGuard, PluginStartContext, PluginStartDecision, PluginNotifier, PluginToastInput, PluginAlertSound, PluginDialogApi, PluginPromptApi, PluginDialogAlertInput, PluginDialogConfirmInput, PluginPromptTextInput, PluginPromptNumberInput, PluginPromptSelectInput, PluginIndicatorType, PluginIndicatorInput, PluginSelfApi, } from "./types/context";
3
3
  export type { PluginNavigationHelper, PluginPilotUser, PluginToastAPI, PluginUIContext, } from "./types/context-ui";
4
4
  export type { PluginSettingType, PluginSettingOption, PluginSettingDefinition, PluginAvailableSettings, BooleanSettingDef, TextSettingDef, LongtextSettingDef, NumberSettingDef, RangeSettingDef, ListSettingDef, RadioSettingDef, DateSettingDef, JsonSettingDef, } from "./types/settings";
5
5
  export type { PluginBackgroundModule, PluginRouteComponent, PluginUIModule, } from "./types/module";
@@ -201,6 +201,32 @@ export type PluginToastInput = {
201
201
  };
202
202
  /** Fixed shell-bundled sound catalogue. No plugin-supplied audio. */
203
203
  export type PluginAlertSound = "alert" | "warning" | "error" | "success" | "chime";
204
+ /** Visual style of a plugin's sidebar indicator. */
205
+ export type PluginIndicatorType = "notification" | "warning";
206
+ /** Input for `ctx.plugin.setIndicator`. */
207
+ export type PluginIndicatorInput = {
208
+ /** A passive dot ("notification") or an amber warning triangle ("warning"). */
209
+ type: PluginIndicatorType;
210
+ /** Optional hover text shown on the indicator. When omitted, the indicator has no tooltip. */
211
+ tooltip?: string;
212
+ /**
213
+ * When true, the indicator clears automatically the first time the user
214
+ * opens this plugin. Defaults to false — it otherwise persists until
215
+ * `clearIndicator()` or a shell restart.
216
+ */
217
+ dismissOnOpen?: boolean;
218
+ };
219
+ /**
220
+ * A plugin's control over its own presence in the shell. Backs `ctx.plugin`.
221
+ * Today: the sidebar indicator. The `error` style is reserved for the system
222
+ * (a crashed plugin) and always takes precedence over a plugin-set indicator.
223
+ */
224
+ export type PluginSelfApi = {
225
+ /** Set (or replace) this plugin's sidebar indicator. */
226
+ setIndicator(indicator: PluginIndicatorInput): Promise<void>;
227
+ /** Remove this plugin's sidebar indicator, if any. */
228
+ clearIndicator(): Promise<void>;
229
+ };
204
230
  /** Input for `ctx.dialog.alert`. */
205
231
  export type PluginDialogAlertInput = {
206
232
  title: string;
@@ -320,5 +346,7 @@ export type PluginContext = {
320
346
  dialog: PluginDialogApi;
321
347
  /** Blocking, awaited input prompts (text/number/select). */
322
348
  prompt: PluginPromptApi;
349
+ /** Control this plugin's own shell presence (e.g. the sidebar indicator). */
350
+ plugin: PluginSelfApi;
323
351
  };
324
352
  //# sourceMappingURL=context.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvexsoftware/stratos-sdk",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "description": "Plugin SDK for Stratos — types, hooks, and UI components",
5
5
  "author": {
6
6
  "name": "Skyvex Software Pty Ltd",