@skyvexsoftware/stratos-sdk 0.1.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.
Files changed (101) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +201 -0
  3. package/dist/helpers/createPlugin.d.ts +22 -0
  4. package/dist/helpers/createPlugin.js +32 -0
  5. package/dist/helpers/index.d.ts +4 -0
  6. package/dist/helpers/index.js +3 -0
  7. package/dist/helpers/units.d.ts +36 -0
  8. package/dist/helpers/units.js +101 -0
  9. package/dist/hooks/context.d.ts +12 -0
  10. package/dist/hooks/context.js +18 -0
  11. package/dist/hooks/index.d.ts +16 -0
  12. package/dist/hooks/index.js +16 -0
  13. package/dist/hooks/useFlightEvents.d.ts +37 -0
  14. package/dist/hooks/useFlightEvents.js +152 -0
  15. package/dist/hooks/useFlightManager.d.ts +20 -0
  16. package/dist/hooks/useFlightManager.js +90 -0
  17. package/dist/hooks/useFlightPhase.d.ts +31 -0
  18. package/dist/hooks/useFlightPhase.js +67 -0
  19. package/dist/hooks/useLandingAnalysis.d.ts +37 -0
  20. package/dist/hooks/useLandingAnalysis.js +87 -0
  21. package/dist/hooks/usePluginLogger.d.ts +13 -0
  22. package/dist/hooks/usePluginLogger.js +16 -0
  23. package/dist/hooks/useShellAuth.d.ts +14 -0
  24. package/dist/hooks/useShellAuth.js +13 -0
  25. package/dist/hooks/useShellConfig.d.ts +14 -0
  26. package/dist/hooks/useShellConfig.js +14 -0
  27. package/dist/hooks/useShellNavigation.d.ts +12 -0
  28. package/dist/hooks/useShellNavigation.js +15 -0
  29. package/dist/hooks/useShellToast.d.ts +12 -0
  30. package/dist/hooks/useShellToast.js +15 -0
  31. package/dist/hooks/useSimData.d.ts +70 -0
  32. package/dist/hooks/useSimData.js +135 -0
  33. package/dist/hooks/useSimulatorData.d.ts +57 -0
  34. package/dist/hooks/useSimulatorData.js +258 -0
  35. package/dist/hooks/useTrackingSession.d.ts +40 -0
  36. package/dist/hooks/useTrackingSession.js +152 -0
  37. package/dist/icons.d.ts +13 -0
  38. package/dist/icons.js +13 -0
  39. package/dist/index.d.ts +30 -0
  40. package/dist/index.js +28 -0
  41. package/dist/shared-types/flight-manager.d.ts +112 -0
  42. package/dist/shared-types/flight-manager.js +2 -0
  43. package/dist/shared-types/index.d.ts +7 -0
  44. package/dist/shared-types/index.js +4 -0
  45. package/dist/shared-types/simulator.d.ts +386 -0
  46. package/dist/shared-types/simulator.js +48 -0
  47. package/dist/shared-types/socket-events.d.ts +171 -0
  48. package/dist/shared-types/socket-events.js +79 -0
  49. package/dist/shared-types/theme.d.ts +3 -0
  50. package/dist/shared-types/theme.js +2 -0
  51. package/dist/types/context.d.ts +206 -0
  52. package/dist/types/context.js +8 -0
  53. package/dist/types/index.d.ts +4 -0
  54. package/dist/types/index.js +2 -0
  55. package/dist/types/manifest.d.ts +42 -0
  56. package/dist/types/manifest.js +12 -0
  57. package/dist/types/module.d.ts +31 -0
  58. package/dist/types/module.js +7 -0
  59. package/dist/ui/alert-dialog.d.ts +21 -0
  60. package/dist/ui/alert-dialog.js +27 -0
  61. package/dist/ui/badge.d.ts +9 -0
  62. package/dist/ui/badge.js +21 -0
  63. package/dist/ui/button.d.ts +17 -0
  64. package/dist/ui/button.js +39 -0
  65. package/dist/ui/card.d.ts +10 -0
  66. package/dist/ui/card.js +25 -0
  67. package/dist/ui/dialog.d.ts +14 -0
  68. package/dist/ui/dialog.js +25 -0
  69. package/dist/ui/index.d.ts +18 -0
  70. package/dist/ui/index.js +16 -0
  71. package/dist/ui/input.d.ts +4 -0
  72. package/dist/ui/input.js +7 -0
  73. package/dist/ui/label.d.ts +5 -0
  74. package/dist/ui/label.js +8 -0
  75. package/dist/ui/radio-group.d.ts +6 -0
  76. package/dist/ui/radio-group.js +11 -0
  77. package/dist/ui/select.d.ts +14 -0
  78. package/dist/ui/select.js +27 -0
  79. package/dist/ui/separator.d.ts +5 -0
  80. package/dist/ui/separator.js +8 -0
  81. package/dist/ui/slider.d.ts +5 -0
  82. package/dist/ui/slider.js +8 -0
  83. package/dist/ui/switch.d.ts +13 -0
  84. package/dist/ui/switch.js +9 -0
  85. package/dist/ui/tabs.d.ts +8 -0
  86. package/dist/ui/tabs.js +13 -0
  87. package/dist/ui/textarea.d.ts +4 -0
  88. package/dist/ui/textarea.js +7 -0
  89. package/dist/ui/tooltip.d.ts +8 -0
  90. package/dist/ui/tooltip.js +11 -0
  91. package/dist/utils/cn.d.ts +3 -0
  92. package/dist/utils/cn.js +6 -0
  93. package/dist/vite/externals.d.ts +9 -0
  94. package/dist/vite/externals.js +19 -0
  95. package/dist/vite/plugin-config.d.ts +49 -0
  96. package/dist/vite/plugin-config.js +236 -0
  97. package/dist/vite/serve-externals.d.ts +9 -0
  98. package/dist/vite/serve-externals.js +78 -0
  99. package/dist/vite/stratos-dev-server.d.ts +21 -0
  100. package/dist/vite/stratos-dev-server.js +188 -0
  101. package/package.json +96 -0
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Plugin Context Types
3
+ *
4
+ * Defines the context objects the shell provides to plugins
5
+ * for both background (main process) and UI (renderer) usage.
6
+ */
7
+ /** All supported setting control types */
8
+ export type PluginSettingType = "boolean" | "text" | "longtext" | "number" | "range" | "list" | "radio" | "date" | "json";
9
+ /** Option entry for list and radio settings */
10
+ export type PluginSettingOption = {
11
+ value: string;
12
+ label: string;
13
+ };
14
+ /** Base fields shared by all setting definitions */
15
+ type PluginSettingBase = {
16
+ key: string;
17
+ name: string;
18
+ description?: string;
19
+ scope: "user" | "airline";
20
+ };
21
+ /** Boolean setting — rendered as a Switch */
22
+ export type BooleanSettingDef = PluginSettingBase & {
23
+ type: "boolean";
24
+ default?: boolean;
25
+ };
26
+ /** Text setting — rendered as an Input */
27
+ export type TextSettingDef = PluginSettingBase & {
28
+ type: "text";
29
+ default?: string;
30
+ pattern?: string;
31
+ placeholder?: string;
32
+ };
33
+ /** Long text setting — rendered as a Textarea */
34
+ export type LongtextSettingDef = PluginSettingBase & {
35
+ type: "longtext";
36
+ default?: string;
37
+ placeholder?: string;
38
+ };
39
+ /** Number setting — rendered as a Number Input */
40
+ export type NumberSettingDef = PluginSettingBase & {
41
+ type: "number";
42
+ default?: number;
43
+ min?: number;
44
+ max?: number;
45
+ step?: number;
46
+ };
47
+ /** Range setting — rendered as a Slider + value label */
48
+ export type RangeSettingDef = PluginSettingBase & {
49
+ type: "range";
50
+ default?: number;
51
+ min: number;
52
+ max: number;
53
+ step?: number;
54
+ };
55
+ /** List setting — rendered as a Select dropdown */
56
+ export type ListSettingDef = PluginSettingBase & {
57
+ type: "list";
58
+ default?: string;
59
+ options: PluginSettingOption[];
60
+ };
61
+ /** Radio setting — rendered as a Radio group */
62
+ export type RadioSettingDef = PluginSettingBase & {
63
+ type: "radio";
64
+ default?: string;
65
+ options: PluginSettingOption[];
66
+ };
67
+ /** Date setting — rendered as a Date input */
68
+ export type DateSettingDef = PluginSettingBase & {
69
+ type: "date";
70
+ default?: string;
71
+ };
72
+ /** JSON setting — rendered as a monospace Textarea */
73
+ export type JsonSettingDef = PluginSettingBase & {
74
+ type: "json";
75
+ default?: string;
76
+ };
77
+ /** Discriminated union of all setting definitions */
78
+ export type PluginSettingDefinition = BooleanSettingDef | TextSettingDef | LongtextSettingDef | NumberSettingDef | RangeSettingDef | ListSettingDef | RadioSettingDef | DateSettingDef | JsonSettingDef;
79
+ /** Array of available settings declared by a plugin */
80
+ export type PluginAvailableSettings = PluginSettingDefinition[];
81
+ /** Scoped logger provided to background plugins (prefixed with plugin ID) */
82
+ export type PluginLogger = {
83
+ info(category: string, message: string, ...args: unknown[]): void;
84
+ warn(category: string, message: string, ...args: unknown[]): void;
85
+ error(category: string, message: string, ...args: unknown[]): void;
86
+ debug(category: string, message: string, ...args: unknown[]): void;
87
+ };
88
+ /** Scoped config store (namespaced to the plugin) */
89
+ export type PluginConfigStore = {
90
+ get<T>(key: string): Promise<T | undefined>;
91
+ get<T>(key: string, defaultValue: T): Promise<T>;
92
+ set<T>(key: string, value: T): Promise<void>;
93
+ delete(key: string): Promise<void>;
94
+ getAll(): Promise<Record<string, unknown>>;
95
+ };
96
+ /**
97
+ * IPC registration helper for background plugins.
98
+ * Auto-prefixes channels with `plugin:{pluginId}:` to prevent collisions.
99
+ */
100
+ export type PluginIPCRegistrar = {
101
+ /** Register a handler for an IPC channel. Channel is auto-prefixed. */
102
+ handle(channel: string, handler: (...args: unknown[]) => unknown): void;
103
+ /** Remove a handler for an IPC channel. */
104
+ removeHandler(channel: string): void;
105
+ /** Send a message to the renderer. Channel is auto-prefixed. */
106
+ send(channel: string, ...args: unknown[]): void;
107
+ };
108
+ /** Read-only auth token accessor */
109
+ export type PluginAuthAccessor = {
110
+ /** Get the current auth token, or null if not authenticated */
111
+ getToken(): Promise<string | null>;
112
+ /** Check if the user is currently authenticated */
113
+ isAuthenticated(): Promise<boolean>;
114
+ };
115
+ /** Express route registration helper for background plugins */
116
+ export type PluginServerRegistrar = {
117
+ /** Register an Express router at the given path prefix (e.g. '/api/booking') */
118
+ registerRouter(prefix: string, router: unknown): void;
119
+ };
120
+ /** SQLite database accessor for background plugins */
121
+ export type PluginDatabaseAccessor = {
122
+ /**
123
+ * Open (or create) a SQLite database file scoped to this plugin's data directory.
124
+ * Returns a better-sqlite3 Database instance.
125
+ * @param filename - Name of the database file (e.g. "landing-reports.db")
126
+ */
127
+ open(filename: string): unknown;
128
+ };
129
+ /**
130
+ * Context passed to a plugin's background onStart() function.
131
+ * Provides scoped access to shell infrastructure.
132
+ */
133
+ export type PluginContext = {
134
+ /** Scoped logger (prefixed with plugin ID) */
135
+ logger: PluginLogger;
136
+ /** Scoped config store (namespaced to plugin) */
137
+ config: PluginConfigStore;
138
+ /** IPC registration helper (auto-prefixed channels) */
139
+ ipc: PluginIPCRegistrar;
140
+ /** Read-only auth token accessor */
141
+ auth: PluginAuthAccessor;
142
+ /** Express server route registrar */
143
+ server: PluginServerRegistrar;
144
+ /** SQLite database accessor (files stored in plugin's data directory) */
145
+ database: PluginDatabaseAccessor;
146
+ };
147
+ /** Navigation helper for plugin UI components */
148
+ export type PluginNavigationHelper = {
149
+ /** Navigate to a route within this plugin */
150
+ navigateTo(path: string): void;
151
+ /** Navigate to a route in another plugin */
152
+ navigateToPlugin(pluginId: string, path: string): void;
153
+ /** Navigate to a shell route */
154
+ navigateToShell(path: string): void;
155
+ /** Get the current route path */
156
+ getCurrentPath(): string;
157
+ };
158
+ /** Toast/notification API for plugin UI */
159
+ export type PluginToastAPI = {
160
+ success(message: string): void;
161
+ error(message: string): void;
162
+ info(message: string): void;
163
+ warning(message: string): void;
164
+ };
165
+ /**
166
+ * UI context available to plugin renderer components via React context.
167
+ * Provides shared hooks and utilities from the shell.
168
+ */
169
+ export type PluginUIContext = {
170
+ /** The plugin's unique ID */
171
+ pluginId: string;
172
+ /** Auth hooks (useAuth pattern) */
173
+ auth: {
174
+ isAuthenticated: boolean;
175
+ token: string | null;
176
+ user: unknown;
177
+ };
178
+ /** Current airline info (from Stratos API) */
179
+ airline?: {
180
+ id: string;
181
+ name: string;
182
+ icao: string;
183
+ logo_light: string;
184
+ logo_dark: string;
185
+ } | null;
186
+ /** Config access hooks */
187
+ config: {
188
+ get<T>(key: string): T | undefined;
189
+ get<T>(key: string, defaultValue: T): T;
190
+ };
191
+ /** Socket/real-time connection state */
192
+ socket: {
193
+ connected: boolean;
194
+ emit(event: string, data: unknown): void;
195
+ on(event: string, handler: (data: unknown) => void): void;
196
+ off(event: string, handler: (data: unknown) => void): void;
197
+ };
198
+ /** Navigation utilities */
199
+ navigation: PluginNavigationHelper;
200
+ /** Toast/notification API */
201
+ toast: PluginToastAPI;
202
+ /** Scoped logger for renderer-side logging */
203
+ logger: PluginLogger;
204
+ };
205
+ export {};
206
+ //# sourceMappingURL=context.d.ts.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Plugin Context Types
3
+ *
4
+ * Defines the context objects the shell provides to plugins
5
+ * for both background (main process) and UI (renderer) usage.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1,4 @@
1
+ export type { PluginAuthor, PluginManifest } from "./manifest";
2
+ export type { PluginAuthAccessor, PluginConfigStore, PluginContext, PluginDatabaseAccessor, PluginIPCRegistrar, PluginLogger, PluginNavigationHelper, PluginServerRegistrar, PluginToastAPI, PluginUIContext, } from "./context";
3
+ export type { PluginBackgroundModule, PluginRouteComponent, PluginUIModule, } from "./module";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Plugin Manifest Schema
3
+ *
4
+ * Defines the structure of a plugin's plugin.json file.
5
+ * Every plugin must include a valid plugin.json at its root.
6
+ *
7
+ * Background and UI modules are discovered by convention:
8
+ * - background/index.js — background service entry point
9
+ * - ui/index.js — renderer UI entry point
10
+ */
11
+ import type { PluginSettingDefinition } from "./context";
12
+ /** Plugin author information */
13
+ export type PluginAuthor = {
14
+ /** Unique developer slug (e.g. "skyvex-software") */
15
+ id: string;
16
+ /** Display name (e.g. "SkyVex Software") */
17
+ name: string;
18
+ /** Contact email address (optional) */
19
+ contact?: string;
20
+ };
21
+ /** Complete plugin manifest schema */
22
+ export type PluginManifest = {
23
+ /** Unique plugin slug (e.g. "flight-tracking") */
24
+ id: string;
25
+ /** Plugin type — "user" for plugins installed by the user, "airline" for plugins installed and managed by the VA on the user's behalf */
26
+ type: "user" | "airline";
27
+ /** Human-readable display name */
28
+ name: string;
29
+ /** Semantic version (e.g. "1.0.0") */
30
+ version: string;
31
+ /** Short description of the plugin's purpose */
32
+ description: string;
33
+ /** Plugin author information */
34
+ author: PluginAuthor;
35
+ /** Sidebar icon for light theme — relative path to a PNG in the plugin's assets/ directory (e.g. "icon-light.png") */
36
+ icon_light: string;
37
+ /** Sidebar icon for dark theme — relative path to a PNG in the plugin's assets/ directory (e.g. "icon-dark.png") */
38
+ icon_dark: string;
39
+ /** Typed settings this plugin declares. User-scoped settings render in the Settings page; airline-scoped settings are managed by the VA platform. */
40
+ availableSettings?: PluginSettingDefinition[];
41
+ };
42
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Plugin Manifest Schema
3
+ *
4
+ * Defines the structure of a plugin's plugin.json file.
5
+ * Every plugin must include a valid plugin.json at its root.
6
+ *
7
+ * Background and UI modules are discovered by convention:
8
+ * - background/index.js — background service entry point
9
+ * - ui/index.js — renderer UI entry point
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Plugin Module Contracts
3
+ *
4
+ * Defines the export shapes for plugin background and UI modules.
5
+ */
6
+ import type { ComponentType, LazyExoticComponent } from "react";
7
+ import type { PluginContext } from "./context";
8
+ /**
9
+ * Background module export contract.
10
+ * Each plugin's background entry module must export these functions.
11
+ */
12
+ export type PluginBackgroundModule = {
13
+ /** Called during shell startup after auth is initialized */
14
+ onStart(ctx: PluginContext): Promise<void>;
15
+ /** Called during shell shutdown for graceful teardown */
16
+ onStop(): Promise<void>;
17
+ /** Optional: called when a plugin is reloaded after an update */
18
+ onResume?(ctx: PluginContext): Promise<void>;
19
+ };
20
+ /**
21
+ * A plugin UI route component — either a regular React component
22
+ * or a lazy-loaded one.
23
+ */
24
+ export type PluginRouteComponent = ComponentType | LazyExoticComponent<ComponentType>;
25
+ /**
26
+ * UI module export contract.
27
+ * Default export is a single root React component for the plugin.
28
+ * If the plugin needs internal routing, it uses PluginRouter internally.
29
+ */
30
+ export type PluginUIModule = PluginRouteComponent;
31
+ //# sourceMappingURL=module.d.ts.map
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Plugin Module Contracts
3
+ *
4
+ * Defines the export shapes for plugin background and UI modules.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=module.js.map
@@ -0,0 +1,21 @@
1
+ import * as React from "react";
2
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
3
+ declare const AlertDialog: React.FC<AlertDialogPrimitive.AlertDialogProps>;
4
+ declare const AlertDialogTrigger: React.ForwardRefExoticComponent<AlertDialogPrimitive.AlertDialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const AlertDialogPortal: React.FC<AlertDialogPrimitive.AlertDialogPortalProps>;
6
+ declare const AlertDialogOverlay: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
7
+ declare const AlertDialogContent: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const AlertDialogHeader: {
9
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ displayName: string;
11
+ };
12
+ declare const AlertDialogFooter: {
13
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
14
+ displayName: string;
15
+ };
16
+ declare const AlertDialogTitle: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
17
+ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
18
+ declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
19
+ declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<AlertDialogPrimitive.AlertDialogCancelProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
20
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
21
+ //# sourceMappingURL=alert-dialog.d.ts.map
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
4
+ import { cn } from "../utils/cn";
5
+ import { buttonVariants } from "./button";
6
+ const AlertDialog = AlertDialogPrimitive.Root;
7
+ const AlertDialogTrigger = AlertDialogPrimitive.Trigger;
8
+ const AlertDialogPortal = AlertDialogPrimitive.Portal;
9
+ const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Overlay, { className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", className), ...props, ref: ref })));
10
+ AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;
11
+ const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => (_jsxs(AlertDialogPortal, { children: [_jsx(AlertDialogOverlay, {}), _jsx(AlertDialogPrimitive.Content, { ref: ref, className: cn("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg", className), ...props })] })));
12
+ AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;
13
+ const AlertDialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col space-y-2 text-center sm:text-left", className), ...props }));
14
+ AlertDialogHeader.displayName = "AlertDialogHeader";
15
+ const AlertDialogFooter = ({ className, ...props }) => (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
16
+ AlertDialogFooter.displayName = "AlertDialogFooter";
17
+ const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Title, { ref: ref, className: cn("text-lg font-semibold", className), ...props })));
18
+ AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;
19
+ const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Description, { ref: ref, className: cn("text-muted-foreground text-sm", className), ...props })));
20
+ AlertDialogDescription.displayName =
21
+ AlertDialogPrimitive.Description.displayName;
22
+ const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Action, { ref: ref, className: cn(buttonVariants(), className), ...props })));
23
+ AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;
24
+ const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => (_jsx(AlertDialogPrimitive.Cancel, { ref: ref, className: cn(buttonVariants({ variant: "outline" }), "mt-2 sm:mt-0", className), ...props })));
25
+ AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;
26
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, };
27
+ //# sourceMappingURL=alert-dialog.js.map
@@ -0,0 +1,9 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export type BadgeProps = React.HTMLAttributes<HTMLDivElement> & VariantProps<typeof badgeVariants>;
7
+ declare function Badge({ className, variant, ...props }: BadgeProps): import("react/jsx-runtime").JSX.Element;
8
+ export { Badge, badgeVariants };
9
+ //# sourceMappingURL=badge.d.ts.map
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../utils/cn";
4
+ const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden", {
5
+ variants: {
6
+ variant: {
7
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
8
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
9
+ destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
10
+ outline: "text-foreground",
11
+ },
12
+ },
13
+ defaultVariants: {
14
+ variant: "default",
15
+ },
16
+ });
17
+ function Badge({ className, variant, ...props }) {
18
+ return (_jsx("div", { className: cn(badgeVariants({ variant }), className), ...props }));
19
+ }
20
+ export { Badge, badgeVariants };
21
+ //# sourceMappingURL=badge.js.map
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "pill-pause" | "pill-resume" | "pill-end" | "pill-submit" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "pill" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ export type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
8
+ asChild?: boolean;
9
+ };
10
+ declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<(props?: ({
11
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "pill-pause" | "pill-resume" | "pill-end" | "pill-submit" | null | undefined;
12
+ size?: "default" | "sm" | "lg" | "icon" | "pill" | null | undefined;
13
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
14
+ asChild?: boolean;
15
+ } & React.RefAttributes<HTMLButtonElement>>;
16
+ export { Button, buttonVariants };
17
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Slot } from "@radix-ui/react-slot";
4
+ import { cva } from "class-variance-authority";
5
+ import { cn } from "../utils/cn";
6
+ const buttonVariants = cva("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background cursor-pointer transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", {
7
+ variants: {
8
+ variant: {
9
+ default: "bg-primary text-primary-foreground hover:bg-primary/90",
10
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
11
+ outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
12
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
13
+ ghost: "hover:bg-accent hover:text-accent-foreground",
14
+ link: "text-primary underline-offset-4 hover:underline",
15
+ "pill-pause": "bg-accent-orange/8 text-accent-orange border border-accent-orange/15 rounded-md text-[10px] font-medium",
16
+ "pill-resume": "bg-accent-green/8 text-accent-green border border-accent-green/15 rounded-md text-[10px] font-medium",
17
+ "pill-end": "bg-destructive/8 text-destructive border border-destructive/15 rounded-md text-[10px] font-medium",
18
+ "pill-submit": "bg-primary/8 text-primary border border-primary/15 rounded-md text-[10px] font-medium",
19
+ },
20
+ size: {
21
+ default: "h-10 px-4 py-2",
22
+ sm: "h-9 rounded-md px-3",
23
+ lg: "h-11 rounded-md px-8",
24
+ icon: "h-10 w-10",
25
+ pill: "px-2 py-1",
26
+ },
27
+ },
28
+ defaultVariants: {
29
+ variant: "default",
30
+ size: "default",
31
+ },
32
+ });
33
+ const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => {
34
+ const Comp = asChild ? Slot : "button";
35
+ return (_jsx(Comp, { className: cn(buttonVariants({ variant, size, className })), ref: ref, ...props }));
36
+ });
37
+ Button.displayName = "Button";
38
+ export { Button, buttonVariants };
39
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
10
+ //# sourceMappingURL=card.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../utils/cn";
3
+ function Card({ className, ...props }) {
4
+ return (_jsx("div", { "data-slot": "card", className: cn("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm", className), ...props }));
5
+ }
6
+ function CardHeader({ className, ...props }) {
7
+ return (_jsx("div", { "data-slot": "card-header", className: cn("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6", className), ...props }));
8
+ }
9
+ function CardTitle({ className, ...props }) {
10
+ return (_jsx("div", { "data-slot": "card-title", className: cn("leading-none font-semibold", className), ...props }));
11
+ }
12
+ function CardDescription({ className, ...props }) {
13
+ return (_jsx("div", { "data-slot": "card-description", className: cn("text-muted-foreground text-sm", className), ...props }));
14
+ }
15
+ function CardAction({ className, ...props }) {
16
+ return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
17
+ }
18
+ function CardContent({ className, ...props }) {
19
+ return (_jsx("div", { "data-slot": "card-content", className: cn("px-6", className), ...props }));
20
+ }
21
+ function CardFooter({ className, ...props }) {
22
+ return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center px-6 [.border-t]:pt-6", className), ...props }));
23
+ }
24
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
25
+ //# sourceMappingURL=card.js.map
@@ -0,0 +1,14 @@
1
+ import * as React from "react";
2
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
3
+ declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
+ declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
6
+ declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare function DialogHeader({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
10
+ declare function DialogFooter({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
11
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
12
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
13
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
14
+ //# sourceMappingURL=dialog.d.ts.map
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import * as DialogPrimitive from "@radix-ui/react-dialog";
4
+ import { X } from "lucide-react";
5
+ import { cn } from "../utils/cn";
6
+ const Dialog = DialogPrimitive.Root;
7
+ const DialogTrigger = DialogPrimitive.Trigger;
8
+ const DialogPortal = DialogPrimitive.Portal;
9
+ const DialogClose = DialogPrimitive.Close;
10
+ const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Overlay, { ref: ref, className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80", className), ...props })));
11
+ DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
12
+ const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg", className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
13
+ DialogContent.displayName = DialogPrimitive.Content.displayName;
14
+ function DialogHeader({ className, ...props }) {
15
+ return (_jsx("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props }));
16
+ }
17
+ function DialogFooter({ className, ...props }) {
18
+ return (_jsx("div", { className: cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", className), ...props }));
19
+ }
20
+ const DialogTitle = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Title, { ref: ref, className: cn("text-lg leading-none font-semibold tracking-tight", className), ...props })));
21
+ DialogTitle.displayName = DialogPrimitive.Title.displayName;
22
+ const DialogDescription = React.forwardRef(({ className, ...props }, ref) => (_jsx(DialogPrimitive.Description, { ref: ref, className: cn("text-muted-foreground text-sm", className), ...props })));
23
+ DialogDescription.displayName = DialogPrimitive.Description.displayName;
24
+ export { Dialog, DialogPortal, DialogOverlay, DialogClose, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
25
+ //# sourceMappingURL=dialog.js.map
@@ -0,0 +1,18 @@
1
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from "./alert-dialog";
2
+ export { Badge, badgeVariants } from "./badge";
3
+ export type { BadgeProps } from "./badge";
4
+ export { Button, buttonVariants } from "./button";
5
+ export type { ButtonProps } from "./button";
6
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card";
7
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./dialog";
8
+ export { Input } from "./input";
9
+ export { Label } from "./label";
10
+ export { RadioGroup, RadioGroupItem } from "./radio-group";
11
+ export { Slider } from "./slider";
12
+ export { Switch } from "./switch";
13
+ export { Textarea } from "./textarea";
14
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./select";
15
+ export { Separator } from "./separator";
16
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs";
17
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./tooltip";
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,16 @@
1
+ export { AlertDialog, AlertDialogPortal, AlertDialogOverlay, AlertDialogTrigger, AlertDialogContent, AlertDialogHeader, AlertDialogFooter, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel, } from "./alert-dialog";
2
+ export { Badge, badgeVariants } from "./badge";
3
+ export { Button, buttonVariants } from "./button";
4
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, } from "./card";
5
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, } from "./dialog";
6
+ export { Input } from "./input";
7
+ export { Label } from "./label";
8
+ export { RadioGroup, RadioGroupItem } from "./radio-group";
9
+ export { Slider } from "./slider";
10
+ export { Switch } from "./switch";
11
+ export { Textarea } from "./textarea";
12
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, } from "./select";
13
+ export { Separator } from "./separator";
14
+ export { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs";
15
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, } from "./tooltip";
16
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,4 @@
1
+ import * as React from "react";
2
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
3
+ export { Input };
4
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cn } from "../utils/cn";
3
+ function Input({ className, type, ...props }) {
4
+ return (_jsx("input", { type: type, "data-slot": "input", className: cn("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", "focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive", className), ...props }));
5
+ }
6
+ export { Input };
7
+ //# sourceMappingURL=input.js.map
@@ -0,0 +1,5 @@
1
+ import * as React from "react";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Label };
5
+ //# sourceMappingURL=label.d.ts.map
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import * as LabelPrimitive from "@radix-ui/react-label";
3
+ import { cn } from "../utils/cn";
4
+ function Label({ className, ...props }) {
5
+ return (_jsx(LabelPrimitive.Root, { "data-slot": "label", className: cn("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50", className), ...props }));
6
+ }
7
+ export { Label };
8
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
3
+ declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
+ declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export { RadioGroup, RadioGroupItem };
6
+ //# sourceMappingURL=radio-group.d.ts.map