@skyvexsoftware/stratos-sdk 0.21.0 → 0.22.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/README.md CHANGED
@@ -97,7 +97,7 @@ The `vite` option accepts any Vite config to merge in (plugins, resolve, css, et
97
97
  - `available_settings`: Optional array of setting definitions (boolean, text, number, list, etc.)
98
98
  - `min_core_version`: Optional oldest Stratos Core the plugin runs on (e.g. `"2.49.0"`)
99
99
 
100
- plugin.json keys are snake_case. Uploads using the old camelCase names (`availableSettings`, `minCoreVersion`, `includeSourceMaps`, `attachesFilesToPirep`) are refused.
100
+ plugin.json keys are snake_case.
101
101
 
102
102
  ## API Reference
103
103
 
@@ -203,9 +203,7 @@ import { Plane, Map, Settings, Helicopter } from "lucide-react";
203
203
 
204
204
  The SDK's Vite config shims `react`, `react-dom`, and their jsx subpaths so every copy of React in your plugin graph (including lucide-react's internals) resolves to the shell's single instance.
205
205
 
206
- If you need dynamic lookup (e.g. icons chosen by name from a remote config), `import { icons } from "lucide-react"` gives you the full map — at the cost of bundling the whole set into your plugin. Prefer a curated static map when possible.
207
-
208
- Earlier SDK versions exposed `STRATOS_ICONS` and `STRATOS_ICON_NAMES` as convenience re-exports of lucide's `icons` object. Those exports are still available but **deprecated** — prefer the patterns above in new code.
206
+ For icons chosen by name at runtime (e.g. from an airline setting), use `DynamicIcon` from `@skyvexsoftware/stratos-sdk/icons`. Stratos loads each icon on demand (core 2.49.0+), so your plugin bundles none of the set.
209
207
 
210
208
  ### Types
211
209
 
package/dist/icons.d.ts CHANGED
@@ -1,21 +1,2 @@
1
- /**
2
- * Re-exports of lucide-react's icon registry.
3
- *
4
- * @deprecated Since SDK 0.7.2. Import from `lucide-react` directly — static
5
- * imports tree-shake, and the SDK's Vite config shims `react` so lucide's
6
- * internals resolve to the shell's React instance (no bundle duplication,
7
- * no two-React crashes). For genuinely dynamic name→component lookup, use
8
- * `import { icons } from "lucide-react"` which costs ~60 KB gzipped in your
9
- * plugin bundle — prefer a curated static map where you can.
10
- *
11
- * Retained as a thin re-export so existing plugin bundles that were built
12
- * against SDK 0.6.x and earlier keep working when core upgrades the SDK.
13
- * Safe to remove in a future major release once no shipped plugin references
14
- * these exports.
15
- */
16
- import { icons } from "lucide-react";
17
- /** @deprecated Import from `lucide-react` directly. See file docstring. */
18
- export declare const STRATOS_ICONS: typeof icons;
19
- /** @deprecated Import from `lucide-react` directly. See file docstring. */
20
- export declare const STRATOS_ICON_NAMES: string[];
1
+ export {};
21
2
  //# sourceMappingURL=icons.d.ts.map
package/dist/icons.js CHANGED
@@ -1,20 +1,12 @@
1
1
  /**
2
- * Re-exports of lucide-react's icon registry.
3
- *
4
- * @deprecated Since SDK 0.7.2. Import from `lucide-react` directly — static
5
- * imports tree-shake, and the SDK's Vite config shims `react` so lucide's
6
- * internals resolve to the shell's React instance (no bundle duplication,
7
- * no two-React crashes). For genuinely dynamic name→component lookup, use
8
- * `import { icons } from "lucide-react"` which costs ~60 KB gzipped in your
9
- * plugin bundle — prefer a curated static map where you can.
10
- *
11
- * Retained as a thin re-export so existing plugin bundles that were built
12
- * against SDK 0.6.x and earlier keep working when core upgrades the SDK.
13
- * Safe to remove in a future major release once no shipped plugin references
14
- * these exports.
2
+ * Re-exports of lucide-react's icon registry, kept at runtime for plugin
3
+ * bundles built against SDK 0.6.x and earlier. Left out of the published
4
+ * types (`@internal`): plugins import icons from `lucide-react` or use
5
+ * `DynamicIcon`. Safe to remove in a future major release once no shipped
6
+ * plugin references these exports.
15
7
  */
16
8
  import { icons } from "lucide-react";
17
- /** @deprecated Import from `lucide-react` directly. See file docstring. */
9
+ /** @internal See file docstring. */
18
10
  export const STRATOS_ICONS = icons;
19
- /** @deprecated Import from `lucide-react` directly. See file docstring. */
11
+ /** @internal See file docstring. */
20
12
  export const STRATOS_ICON_NAMES = Object.keys(icons).sort();
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, PluginPirepSubmissionContext, PluginPirepAttachment, PluginPirepAttachHandler, PluginFileAttachment, PluginNotifier, PluginToastInput, BuiltInSound, PluginAlertSound, PluginDialogApi, PluginPromptApi, PluginDialogAlertInput, PluginDialogConfirmInput, PluginPromptTextInput, PluginPromptNumberInput, PluginPromptSelectInput, PluginIndicatorType, PluginIndicatorInput, PluginSelfApi, } from "./types/context";
2
+ export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginVaApiClient, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginServerRegistrar, PluginFlightAccessor, PluginFlightLogWriter, PluginFlightLogInput, PluginFlightLogPatch, PluginStartGuard, PluginStartContext, PluginStartDecision, PluginPirepSubmissionContext, PluginPirepAttachment, PluginPirepAttachHandler, PluginFileAttachment, PluginNotifier, PluginToastInput, BuiltInSound, 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";
@@ -39,6 +39,5 @@ export type { AutoStartConfirmPayload, ConnectionState, LogEntryPayload, Notific
39
39
  export type { PluginDialogKind, PluginDialogSelectOption, PluginDialogSpec, PluginDialogResult, PluginDialogClosePayload, } from "./shared-types/plugin-dialogs";
40
40
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, Badge, badgeVariants, Button, buttonVariants, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Combobox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./ui";
41
41
  export type { BadgeProps, ButtonProps, ComboboxOption, ComboboxProps, } from "./ui";
42
- export { STRATOS_ICONS, STRATOS_ICON_NAMES } from "./icons";
43
42
  export { cn } from "./utils/cn";
44
43
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -28,10 +28,10 @@ export { useSocket, useSimulatorData, useProtocolUrl, useNotifications, useSyste
28
28
  export { SOCKET_EVENTS } from "./shared-types/socket-events";
29
29
  // ── UI Primitives ──────────────────────────────────────────────────────
30
30
  export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, Badge, badgeVariants, Button, buttonVariants, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Combobox, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Input, Label, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, RadioGroup, RadioGroupItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Slider, Switch, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./ui";
31
- // ── Icons (deprecated) ────────────────────────────────────────────────
32
- // Kept as a thin re-export of lucide-react's icons registry so plugin
33
- // bundles built against earlier SDK versions keep working when core
34
- // upgrades. New code should import from lucide-react directly.
31
+ // ── Icons (internal) ──────────────────────────────────────────────────
32
+ // Kept at runtime for plugin bundles that still read them; out of the
33
+ // published types. Plugins import from lucide-react or use DynamicIcon.
34
+ /** @internal */
35
35
  export { STRATOS_ICONS, STRATOS_ICON_NAMES } from "./icons";
36
36
  // ── Utilities ──────────────────────────────────────────────────────────
37
37
  export { cn } from "./utils/cn";
@@ -274,11 +274,6 @@ export type PluginNotifier = {
274
274
  * ogg, m4a, aac.
275
275
  */
276
276
  playCustomSound(assetPath: string): Promise<void>;
277
- /**
278
- * @deprecated Use {@link PluginNotifier.playSound}. Retained for back-compat;
279
- * legacy names (`alert`/`warning`/`chime`) now map onto a real bundled file.
280
- */
281
- sound(name: PluginAlertSound): Promise<void>;
282
277
  };
283
278
  /** Input for `ctx.notify.toast`. */
284
279
  export type PluginToastInput = {
@@ -290,8 +285,6 @@ export type PluginToastInput = {
290
285
  };
291
286
  /** Built-in shell sound catalogue. Semantic names mapped to bundled files by the shell. */
292
287
  export type BuiltInSound = "attention" | "error" | "success";
293
- /** @deprecated Use {@link BuiltInSound} with `playSound`. */
294
- export type PluginAlertSound = "alert" | "warning" | "error" | "success" | "chime";
295
288
  /** Visual style of a plugin's sidebar indicator. */
296
289
  export type PluginIndicatorType = "notification" | "warning";
297
290
  /** Input for `ctx.plugin.setIndicator`. */
@@ -1,5 +1,5 @@
1
1
  export type { PluginAuthor, PluginManifest } from "./manifest";
2
- export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginServerRegistrar, PluginFlightAccessor, PluginFlightLogWriter, PluginFlightLogInput, PluginFlightLogPatch, PluginStartGuard, PluginStartContext, PluginStartDecision, PluginPirepSubmissionContext, PluginPirepAttachment, PluginPirepAttachHandler, PluginFileAttachment, PluginNotifier, PluginToastInput, BuiltInSound, PluginAlertSound, } from "./context";
2
+ export type { PluginAirline, PluginAirlineAccessor, PluginAuthAccessor, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginServerRegistrar, PluginFlightAccessor, PluginFlightLogWriter, PluginFlightLogInput, PluginFlightLogPatch, PluginStartGuard, PluginStartContext, PluginStartDecision, PluginPirepSubmissionContext, PluginPirepAttachment, PluginPirepAttachHandler, PluginFileAttachment, PluginNotifier, PluginToastInput, BuiltInSound, } from "./context";
3
3
  export type { PluginNavigationHelper, PluginToastAPI, PluginUIContext, } from "./context-ui";
4
4
  export type { PluginBackgroundModule, PluginRouteComponent, PluginUIModule, } from "./module";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -5,6 +5,11 @@ import { cn } from "../utils/cn";
5
5
  const TooltipProvider = TooltipPrimitive.Provider;
6
6
  const Tooltip = TooltipPrimitive.Root;
7
7
  const TooltipTrigger = TooltipPrimitive.Trigger;
8
- const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (_jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn("bg-popover text-popover-foreground animate-in fade-in-0 zoom-in-95 ease-out-strong data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 origin-[var(--radix-tooltip-content-transform-origin)] overflow-hidden rounded-md border px-3 py-1.5 text-sm shadow-md duration-[125ms] data-[state=instant-open]:animate-none", className), ...props })));
8
+ const TooltipContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => (
9
+ // Portalled like Popover and Select, so a tooltip inside a Dialog or any
10
+ // overflow-hidden container isn't clipped at that container's edge.
11
+ _jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Content, { ref: ref, sideOffset: sideOffset, className: cn(
12
+ // Matches the web platform's tooltip: a dark chip, snappy fade and zoom.
13
+ "z-50 max-w-72 text-balance rounded-md bg-zinc-900 px-2.5 py-1.5 text-xs text-white shadow-lg dark:bg-zinc-800 dark:text-zinc-100 dark:ring-1 dark:ring-white/10", "ease-out-strong data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[var(--radix-tooltip-content-transform-origin)] duration-[125ms]", className), ...props }) })));
9
14
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
10
15
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyvexsoftware/stratos-sdk",
3
- "version": "0.21.0",
3
+ "version": "0.22.0",
4
4
  "description": "Plugin SDK for Stratos — types, hooks, and UI components",
5
5
  "author": {
6
6
  "name": "Skyvex Software Pty Ltd",