react-os-shell 0.1.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.
Files changed (65) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +242 -0
  3. package/dist/Calculator-BNBRNV4P.js +184 -0
  4. package/dist/Calculator-BNBRNV4P.js.map +1 -0
  5. package/dist/Calendar-5EYUVGUU.js +423 -0
  6. package/dist/Calendar-5EYUVGUU.js.map +1 -0
  7. package/dist/Checkers-MIAHIKJH.js +214 -0
  8. package/dist/Checkers-MIAHIKJH.js.map +1 -0
  9. package/dist/Chess-C5BY45NA.js +190 -0
  10. package/dist/Chess-C5BY45NA.js.map +1 -0
  11. package/dist/ConfirmDialog-ZP4AHVUD.js +3 -0
  12. package/dist/ConfirmDialog-ZP4AHVUD.js.map +1 -0
  13. package/dist/CurrencyConverter-TYPU2IRF.js +223 -0
  14. package/dist/CurrencyConverter-TYPU2IRF.js.map +1 -0
  15. package/dist/Email-JEYYJ3YV.js +1835 -0
  16. package/dist/Email-JEYYJ3YV.js.map +1 -0
  17. package/dist/Game2048-3RH3ELRD.js +191 -0
  18. package/dist/Game2048-3RH3ELRD.js.map +1 -0
  19. package/dist/GeminiChat-BXLBJFT4.js +184 -0
  20. package/dist/GeminiChat-BXLBJFT4.js.map +1 -0
  21. package/dist/Minesweeper-VQGLAZON.js +270 -0
  22. package/dist/Minesweeper-VQGLAZON.js.map +1 -0
  23. package/dist/Notepad-YTZRCAXX.js +389 -0
  24. package/dist/Notepad-YTZRCAXX.js.map +1 -0
  25. package/dist/PomodoroTimer-HARIJN4S.js +196 -0
  26. package/dist/PomodoroTimer-HARIJN4S.js.map +1 -0
  27. package/dist/Spreadsheet-IOKEDNS6.js +446 -0
  28. package/dist/Spreadsheet-IOKEDNS6.js.map +1 -0
  29. package/dist/Sudoku-XHLYCEVT.js +197 -0
  30. package/dist/Sudoku-XHLYCEVT.js.map +1 -0
  31. package/dist/Tetris-ZHCZYL24.js +243 -0
  32. package/dist/Tetris-ZHCZYL24.js.map +1 -0
  33. package/dist/Weather-ROZ7TRNW.js +310 -0
  34. package/dist/Weather-ROZ7TRNW.js.map +1 -0
  35. package/dist/apps/index.d.ts +55 -0
  36. package/dist/apps/index.js +48 -0
  37. package/dist/apps/index.js.map +1 -0
  38. package/dist/chunk-5O2KEISQ.js +155 -0
  39. package/dist/chunk-5O2KEISQ.js.map +1 -0
  40. package/dist/chunk-D7PYW2QS.js +265 -0
  41. package/dist/chunk-D7PYW2QS.js.map +1 -0
  42. package/dist/chunk-GP4Y3VCB.js +806 -0
  43. package/dist/chunk-GP4Y3VCB.js.map +1 -0
  44. package/dist/chunk-NSU7OHPC.js +39 -0
  45. package/dist/chunk-NSU7OHPC.js.map +1 -0
  46. package/dist/chunk-PDFQNHW7.js +24 -0
  47. package/dist/chunk-PDFQNHW7.js.map +1 -0
  48. package/dist/chunk-RFTLYCSF.js +144 -0
  49. package/dist/chunk-RFTLYCSF.js.map +1 -0
  50. package/dist/chunk-SVBID2P6.js +142 -0
  51. package/dist/chunk-SVBID2P6.js.map +1 -0
  52. package/dist/chunk-TFGOLXGD.js +41 -0
  53. package/dist/chunk-TFGOLXGD.js.map +1 -0
  54. package/dist/chunk-WIJ45SYD.js +120 -0
  55. package/dist/chunk-WIJ45SYD.js.map +1 -0
  56. package/dist/chunk-WQIS72NL.js +1470 -0
  57. package/dist/chunk-WQIS72NL.js.map +1 -0
  58. package/dist/index.d.ts +642 -0
  59. package/dist/index.js +3443 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/sounds-NT4DEZGD.js +3 -0
  62. package/dist/sounds-NT4DEZGD.js.map +1 -0
  63. package/dist/styles.css +174 -0
  64. package/dist/types-CFIZ1_xt.d.ts +67 -0
  65. package/package.json +76 -0
@@ -0,0 +1,642 @@
1
+ import { W as WindowRegistry } from './types-CFIZ1_xt.js';
2
+ export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-CFIZ1_xt.js';
3
+ import * as react from 'react';
4
+ import { ReactNode, CSSProperties, RefObject } from 'react';
5
+ import * as react_jsx_runtime from 'react/jsx-runtime';
6
+ import { AxiosInstance } from 'axios';
7
+
8
+ /**
9
+ * createWindowRegistry — composes a window registry from one or more partial
10
+ * registry maps. Used at the consumer's App layer to merge package-bundled
11
+ * apps with the consumer's own entity windows.
12
+ *
13
+ * const windows = createWindowRegistry(
14
+ * bundledApps, // utility apps + games + Google apps from the package
15
+ * entityWindows, // consumer-defined entity windows (e.g. Sales Order, Invoice)
16
+ * );
17
+ *
18
+ * Later partials override earlier ones on the same key — handy when a
19
+ * consumer wants to swap a built-in app for their own variant.
20
+ */
21
+
22
+ declare function createWindowRegistry(...partials: WindowRegistry[]): WindowRegistry;
23
+
24
+ /**
25
+ * Nav data types used by <Layout> + <StartMenu>. The actual sections, icons,
26
+ * and categories are consumer-supplied via Layout props — the package never
27
+ * ships nav DATA, only the shape it expects.
28
+ */
29
+
30
+ interface NavItem {
31
+ to: string;
32
+ label: string;
33
+ perms?: string[];
34
+ dividerAfter?: boolean;
35
+ }
36
+ interface NavSection {
37
+ label: string;
38
+ items: NavItem[];
39
+ perms?: string[];
40
+ /** Optional landing route for clicks on the section title itself
41
+ * (e.g. R&D's `/rd` dashboard). */
42
+ to?: string;
43
+ }
44
+ interface VirtualSection {
45
+ label: string;
46
+ items: NavItem[];
47
+ icon?: ReactNode;
48
+ }
49
+ interface StartMenuCategories {
50
+ /** Section labels rendered in the "ERP" group (bold, with section icon). */
51
+ erp: string[];
52
+ /** Section labels rendered in the "system" group. */
53
+ system: string[];
54
+ /** Optional virtual flyouts (e.g. a "Utilities" tray). */
55
+ virtual?: VirtualSection[];
56
+ }
57
+
58
+ /**
59
+ * INTERNAL stub — package-side compatibility for files that legacy-imported
60
+ * default nav data from `shell-config/nav`. The package never ships nav
61
+ * DATA; consumers always supply `navSections` / `navIcons` / `sectionIcons` /
62
+ * `categories` as Layout props.
63
+ *
64
+ * Empty defaults exported here so the copied files compile during the
65
+ * extraction transition. Each consumer-facing field is also re-exported as
66
+ * a TYPE alias for code that only needed the shape.
67
+ */
68
+
69
+ declare function setShellNavIcons(icons: Record<string, ReactNode>): void;
70
+
71
+ /** Hook for widget components to register a settings handler for the right-click menu. */
72
+ declare function useWidgetSettings(handler: () => void): void;
73
+ /** Hook to add custom items to the window title menu from inside a modal */
74
+ declare function useWindowMenuItem(label: string, onClick: () => void, icon?: React.ReactNode): void;
75
+ /** Component that updates the surrounding window's title bar. Render anywhere
76
+ * inside a Modal-rendered page. Cross-bundle safe (uses DOM traversal rather
77
+ * than React Context, which has separate instances in each bundle). */
78
+ declare function WindowTitle({ title }: {
79
+ title: string;
80
+ }): react_jsx_runtime.JSX.Element;
81
+ /** @deprecated Use <WindowTitle> instead — the hook variant doesn't work
82
+ * across bundle boundaries (apps barrel has its own ModalIdContext). */
83
+ declare function useWindowTitle(_title: string): void;
84
+ /**
85
+ * Portal component — renders children into the nearest Modal's footer actions area.
86
+ * position="left" for destructive actions (Delete), default is right for primary actions.
87
+ */
88
+ declare function CopyButton({ text }: {
89
+ text: string;
90
+ }): react_jsx_runtime.JSX.Element;
91
+ /** Hook to check if the current modal is active (frontmost) */
92
+ declare function useModalActive(): boolean;
93
+ declare function ModalActions({ children, position }: {
94
+ children: React.ReactNode;
95
+ position?: 'left' | 'right';
96
+ }): react.ReactPortal | null;
97
+ /**
98
+ * Cancel button that checks for unsaved changes before calling onClick.
99
+ * Automatically detects dirty state from the nearest Modal context.
100
+ */
101
+ declare function CancelButton({ onClick, children, className }: {
102
+ onClick: () => void;
103
+ children?: React.ReactNode;
104
+ className?: string;
105
+ }): react_jsx_runtime.JSX.Element;
106
+ interface ModalProps {
107
+ open: boolean;
108
+ onClose: () => void;
109
+ title: React.ReactNode;
110
+ /** Window icon — shown before title, clicking it opens window menu */
111
+ icon?: React.ReactNode;
112
+ /** Text to copy when the copy icon in the header is clicked (e.g. entity number) */
113
+ copyText?: string;
114
+ size?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
115
+ dirty?: boolean | 'auto';
116
+ onNext?: () => void;
117
+ onPrev?: () => void;
118
+ footer?: React.ReactNode;
119
+ /** When true, body uses overflow-hidden — child content manages its own scrolling */
120
+ bodyScroll?: false;
121
+ /** Custom minimize handler — called instead of the default global minimize */
122
+ onMinimize?: (savedBox: {
123
+ x: number;
124
+ y: number;
125
+ w: number;
126
+ h: number;
127
+ maximized: boolean;
128
+ }) => void;
129
+ /** Restore to a previously saved position/size */
130
+ initialBox?: {
131
+ x: number;
132
+ y: number;
133
+ w: number;
134
+ h: number;
135
+ maximized: boolean;
136
+ };
137
+ /** Footer actions (right side) — alternative to ModalActions portal */
138
+ actions?: React.ReactNode;
139
+ /** Footer actions (left side) — alternative to ModalActions portal */
140
+ actionsLeft?: React.ReactNode;
141
+ /** Allow the window to be pinned on top of all others */
142
+ allowPinOnTop?: boolean;
143
+ /** Initial position hint */
144
+ initialPosition?: 'top-right' | 'top-left';
145
+ /** Widget mode: no title/footer, drag anywhere, right-click context menu */
146
+ widget?: boolean;
147
+ /** Compact title bar: smaller header with title + close only, no minimize/maximize */
148
+ compact?: boolean;
149
+ /** Auto-size height based on content (widget only) */
150
+ autoHeight?: boolean;
151
+ /** Custom menu items for widget right-click context menu */
152
+ widgetMenu?: React.ReactNode;
153
+ /** Custom window dimensions [width, height] in pixels */
154
+ dimensions?: [number, number];
155
+ /** Stable key for persisting window position to sessionStorage */
156
+ windowKey?: string;
157
+ children: React.ReactNode;
158
+ }
159
+ declare function Modal({ open, onClose, title, icon, copyText, size, dirty, onNext, onPrev, footer, bodyScroll, onMinimize, initialBox, actions, actionsLeft, allowPinOnTop, initialPosition, widget, compact, autoHeight, widgetMenu, dimensions, windowKey, children }: ModalProps): react.ReactPortal | null;
160
+
161
+ /**
162
+ * Unified popup menu component — used for all context menus, dropdowns, and flyouts.
163
+ * Reads --menu-density CSS variable: 'tight' or 'normal' (default).
164
+ */
165
+ interface PopupMenuProps {
166
+ children: ReactNode;
167
+ style?: CSSProperties;
168
+ className?: string;
169
+ onClose?: () => void;
170
+ minWidth?: number;
171
+ }
172
+ /** Container for a popup menu — auto-clamps to stay within viewport */
173
+ declare function PopupMenu({ children, style, className, onClose, minWidth }: PopupMenuProps): react_jsx_runtime.JSX.Element;
174
+ /** A clickable menu item */
175
+ declare function PopupMenuItem({ onClick, children, className, danger, disabled }: {
176
+ onClick?: () => void;
177
+ children: ReactNode;
178
+ className?: string;
179
+ danger?: boolean;
180
+ disabled?: boolean;
181
+ }): react_jsx_runtime.JSX.Element;
182
+ /** A divider line between menu items */
183
+ declare function PopupMenuDivider(): react_jsx_runtime.JSX.Element;
184
+ /** A section header label */
185
+ declare function PopupMenuLabel({ children }: {
186
+ children: ReactNode;
187
+ }): react_jsx_runtime.JSX.Element;
188
+
189
+ interface ConfirmOptions {
190
+ title?: string;
191
+ message: string;
192
+ confirmLabel?: string;
193
+ cancelLabel?: string;
194
+ variant?: 'danger' | 'warning' | 'info';
195
+ }
196
+ declare const confirm: (opts: ConfirmOptions | string) => Promise<boolean>;
197
+ interface DestructiveConfirmOptions {
198
+ title?: string;
199
+ message: string;
200
+ confirmWord: string;
201
+ variant?: 'danger' | 'warning';
202
+ }
203
+ declare const confirmDestructive: (opts: DestructiveConfirmOptions) => Promise<boolean>;
204
+ declare function ConfirmProvider({ children }: {
205
+ children: React.ReactNode;
206
+ }): react_jsx_runtime.JSX.Element;
207
+
208
+ interface SearchResult {
209
+ /** Category label, e.g. "Sales Order". */
210
+ type: string;
211
+ /** Primary text shown in the result row. */
212
+ label: string;
213
+ /** Optional secondary line. */
214
+ sub?: string;
215
+ /** Window-registry key passed to openEntity. */
216
+ entity_type: string;
217
+ entity_id: string;
218
+ }
219
+ /** A search provider — given a query, returns matching results. The shell
220
+ * calls every provider in parallel and concatenates the responses. */
221
+ type SearchProvider = (query: string) => Promise<SearchResult[]>;
222
+ /** Bundle of search-related consumer config. */
223
+ interface SearchConfig {
224
+ providers: SearchProvider[];
225
+ /** Per-result-type icon (SVG path `d` attribute). Unmatched types fall
226
+ * back to a generic magnifier glyph. */
227
+ typeIcons?: Record<string, string>;
228
+ placeholder?: string;
229
+ }
230
+ interface GlobalSearchProps extends Partial<SearchConfig> {
231
+ }
232
+ declare function GlobalSearch({ providers, typeIcons, placeholder }?: GlobalSearchProps): react_jsx_runtime.JSX.Element | null;
233
+
234
+ declare function ShortcutHelp(): react_jsx_runtime.JSX.Element;
235
+
236
+ declare const isMac: boolean;
237
+ /** Platform-aware modifier symbols */
238
+ declare const MOD: string;
239
+ declare const ALT: string;
240
+ declare const SHIFT = "\u21E7";
241
+ declare const ENTER = "\u23CE";
242
+ /** Common shortcut labels */
243
+ declare const CMD_ENTER: string;
244
+ declare const CMD_S: string;
245
+ declare const CMD_K: string;
246
+ declare const CMD_DOT: string;
247
+ declare const CMD_A: string;
248
+ declare const ALT_SHIFT_D: string;
249
+ declare const ALT_SHIFT_E: string;
250
+ declare const ALT_SHIFT_N: string;
251
+
252
+ /**
253
+ * Two notification systems:
254
+ *
255
+ * 1. toast.success/error — operation feedback, top-center, auto-dismiss 3s
256
+ * 2. toast.info — system notification, top-right, stays 10s, dismissible
257
+ */
258
+ declare const toast: {
259
+ success: (message: string) => void;
260
+ error: (message: string) => void;
261
+ info: (message: string, opts?: {
262
+ duration?: number;
263
+ }) => void;
264
+ };
265
+
266
+ /** Generic notification shape consumed by the shell. Consumer-specific
267
+ * fields live on `extra` (or just on additional properties — TS structural
268
+ * typing is permissive). */
269
+ interface ShellNotification {
270
+ id: string;
271
+ title: string;
272
+ message?: string;
273
+ entity_type?: string;
274
+ entity_id?: string;
275
+ entity_label?: string;
276
+ is_read: boolean;
277
+ actor_name?: string;
278
+ created_at: string;
279
+ }
280
+ /** Config bundle for the notification system. Supplied by the consumer;
281
+ * the shell never calls a hardcoded URL. */
282
+ interface NotificationsConfig {
283
+ /** Hook called inside <NotificationBell> on every render. Return the
284
+ * current unread count for the signed-in user. */
285
+ useUnreadCount: () => number;
286
+ /** Fetcher for the dropdown list (most recent first). */
287
+ list: (params?: {
288
+ page_size?: number;
289
+ }) => Promise<{
290
+ results: ShellNotification[];
291
+ }>;
292
+ /** Mark a single notification as read. */
293
+ markRead: (id: string) => Promise<unknown>;
294
+ /** Mark every unread notification as read. */
295
+ markAllRead: () => Promise<unknown>;
296
+ /** Click handler for a notification item. */
297
+ onItemClick: (notif: ShellNotification) => void;
298
+ /** Click handler for "View all notifications". When omitted, the link is hidden. */
299
+ onViewAll?: () => void;
300
+ }
301
+ interface NotificationBellProps extends NotificationsConfig {
302
+ popDirection?: 'left' | 'right';
303
+ }
304
+ declare function NotificationBell({ useUnreadCount, list, markRead, markAllRead, onItemClick, onViewAll, popDirection, }: NotificationBellProps): react_jsx_runtime.JSX.Element;
305
+
306
+ /**
307
+ * Bug report review dialog — shows the captured screenshot and lets the user
308
+ * add a quick description before sending.
309
+ *
310
+ * Triggered imperatively from utils/reportBug.ts via openBugReportDialog().
311
+ * The Provider is mounted once at the App root.
312
+ */
313
+ interface BugReportSubmission {
314
+ description: string;
315
+ }
316
+ /** Generic bug-report record shape consumed by the shell's list/detail UI. */
317
+ interface BugReport {
318
+ id: string;
319
+ report_code?: string;
320
+ reporter_name?: string | null;
321
+ screenshot_url?: string | null;
322
+ url?: string;
323
+ user_agent?: string;
324
+ viewport?: string;
325
+ description?: string;
326
+ is_resolved: boolean;
327
+ resolution_note?: string;
328
+ created_at: string;
329
+ [k: string]: unknown;
330
+ }
331
+ /** Payload that <reportBug> sends to the consumer's `submit` callback. */
332
+ interface BugReportSubmitPayload {
333
+ description?: string;
334
+ screenshot?: Blob;
335
+ url: string;
336
+ userAgent: string;
337
+ viewport: string;
338
+ }
339
+ /** Config bundle for the bug-report subsystem. Consumer-supplied; the shell
340
+ * never calls a hardcoded URL. */
341
+ interface BugReportConfig {
342
+ submit: (p: BugReportSubmitPayload) => Promise<unknown>;
343
+ /** Fetcher for the admin Bug Reports list. Receives query-string-shaped
344
+ * params (e.g. `is_resolved=false`); paginated response. When omitted the
345
+ * Bug Reports list page is unavailable. */
346
+ list?: (params?: Record<string, string>) => Promise<{
347
+ results: BugReport[];
348
+ count?: number;
349
+ next?: string | null;
350
+ previous?: string | null;
351
+ }>;
352
+ /** Mark a report resolved or reopened, with an optional admin note. */
353
+ resolve?: (id: string, is_resolved: boolean, resolution_note?: string) => Promise<BugReport>;
354
+ }
355
+ declare function BugReportConfigProvider({ value, children }: {
356
+ value: BugReportConfig;
357
+ children: ReactNode;
358
+ }): react_jsx_runtime.JSX.Element;
359
+ /** Returns the consumer-supplied bug-report config, or null when no provider
360
+ * is mounted. Click handlers should hide their menu item if this is null. */
361
+ declare function useBugReport(): BugReportConfig | null;
362
+ type OpenFn = (screenshot: Blob | null) => Promise<BugReportSubmission | null>;
363
+ declare const openBugReportDialog: OpenFn;
364
+ declare function BugReportProvider({ children }: {
365
+ children: React.ReactNode;
366
+ }): react_jsx_runtime.JSX.Element;
367
+
368
+ interface Props {
369
+ report: BugReport;
370
+ onClose?: () => void;
371
+ }
372
+ declare function BugReportDetail({ report }: Props): react_jsx_runtime.JSX.Element;
373
+
374
+ type SemanticGroup = 'success' | 'active' | 'queued' | 'info' | 'pending' | 'warning' | 'danger' | 'draft' | 'neutral';
375
+ declare function StatusBadgeProvider({ groups, children, }: {
376
+ groups: Record<string, SemanticGroup>;
377
+ children: ReactNode;
378
+ }): react_jsx_runtime.JSX.Element;
379
+ interface StatusBadgeProps {
380
+ status: string;
381
+ }
382
+ declare function StatusBadge({ status }: StatusBadgeProps): react_jsx_runtime.JSX.Element;
383
+
384
+ interface SavedBox {
385
+ x: number;
386
+ y: number;
387
+ w: number;
388
+ h: number;
389
+ maximized: boolean;
390
+ }
391
+ interface MinimizedItem {
392
+ id: string;
393
+ type: 'part_number' | 'modal' | 'page';
394
+ label: string;
395
+ /** Route path for icon lookup (e.g. '/orders', '/invoices') */
396
+ route?: string;
397
+ savedBox?: SavedBox;
398
+ /** Entity registry key (e.g. 'order', 'manufacturer') for restore */
399
+ entityType?: string;
400
+ /** Entity UUID for API fetch on cross-page restore */
401
+ entityId?: string;
402
+ /** Cached entity data for instant rendering while refetch happens */
403
+ entitySnapshot?: any;
404
+ }
405
+ interface MinimizedContextType {
406
+ openWindows: MinimizedItem[];
407
+ openEntity: (entityType: string, entityId: string, snapshot?: any, label?: string, route?: string) => void;
408
+ openPage: (path: string) => void;
409
+ closeEntity: (id: string) => void;
410
+ /** @deprecated kept for backward compat — aliases openEntity/closeEntity */
411
+ minimize: (item: MinimizedItem) => void;
412
+ items: MinimizedItem[];
413
+ restore: (item: MinimizedItem) => void;
414
+ remove: (id: string) => void;
415
+ restoreIfMinimized: (label: string) => boolean;
416
+ openItems: MinimizedItem[];
417
+ }
418
+ declare function useWindowManager(): MinimizedContextType;
419
+ /** Star button to favorite a document — saves to preferences.favorite_documents */
420
+ declare function DocFavStar({ entityType, entityId, label }: {
421
+ entityType: string;
422
+ entityId: string;
423
+ label: string;
424
+ }): react_jsx_runtime.JSX.Element;
425
+ declare function WindowManagerProvider({ children }: {
426
+ children: ReactNode;
427
+ }): react_jsx_runtime.JSX.Element;
428
+
429
+ interface DesktopItem {
430
+ entityType: string;
431
+ entityId: string;
432
+ label: string;
433
+ x?: number;
434
+ y?: number;
435
+ folderId?: string;
436
+ }
437
+ interface DesktopFolder {
438
+ id: string;
439
+ name: string;
440
+ x?: number;
441
+ y?: number;
442
+ }
443
+ interface StickyEntityRef {
444
+ /** Window-registry key used by `openEntity`. */
445
+ entityType: string;
446
+ entityId: string;
447
+ /** Optional human-readable label (defaults to `${prefix}#${number}`). */
448
+ label?: string;
449
+ /** Optional pre-fetched entity payload passed to openEntity as snapshot. */
450
+ snapshot?: unknown;
451
+ }
452
+ type StickyResolver = (prefix: string, number: string) => Promise<StickyEntityRef | null>;
453
+ interface DesktopHostConfig {
454
+ /** Product name shown in the About dialog and desktop context menu. */
455
+ productName?: string;
456
+ /** Tagline shown under the product name in the About dialog. */
457
+ productTagline?: string;
458
+ /** Icon URL shown in the About dialog. Defaults to `/favicon.svg`. */
459
+ productIcon?: string;
460
+ /** Copyright line in the About dialog footer. Hidden when omitted. */
461
+ productCopyright?: string;
462
+ /** Website URL in the About dialog footer. Hidden when omitted. */
463
+ productWebsite?: string;
464
+ /** Wallpaper picker options for the Customization settings page. */
465
+ wallpapers?: {
466
+ src: string;
467
+ label: string;
468
+ }[];
469
+ /** Resolves sticky-note refs (e.g. "SO#27150") to window-registry coords. */
470
+ stickyResolver?: StickyResolver;
471
+ /** Persists the user's desktop shortcut list. */
472
+ saveShortcuts?: (items: DesktopItem[]) => void | Promise<void>;
473
+ /** Persists the user's folder list. */
474
+ saveFolders?: (folders: DesktopFolder[]) => void | Promise<void>;
475
+ /** Persists the snap-to-grid preference. */
476
+ saveSnap?: (snap: boolean) => void | Promise<void>;
477
+ /** Persists the user's notepad / sticky-note content. */
478
+ saveNotes?: (notes: unknown[]) => void | Promise<void>;
479
+ }
480
+ declare function DesktopHostProvider({ value, children }: {
481
+ value: DesktopHostConfig;
482
+ children: ReactNode;
483
+ }): react_jsx_runtime.JSX.Element;
484
+ declare function useDesktopHost(): DesktopHostConfig;
485
+ declare function Desktop({ profile }: {
486
+ profile: any;
487
+ }): react_jsx_runtime.JSX.Element;
488
+
489
+ interface LayoutProps {
490
+ /** Brand label rendered on the start-menu button. */
491
+ productName?: string;
492
+ /** Icon URL rendered next to the brand label. Defaults to `/favicon.svg`. */
493
+ productIcon?: string;
494
+ /** Wallpaper image URLs for the desktop background. When omitted, the
495
+ * desktop renders with no image (just the dark fallback). */
496
+ wallpapers?: string[];
497
+ /** Override the default nav sections shown in the start menu. */
498
+ navSections?: (NavSection | NavItem)[];
499
+ /** Override the per-route icon map used by start menu and favorites. */
500
+ navIcons?: Record<string, ReactNode>;
501
+ /** Override the per-section header icon map used by start menu. */
502
+ sectionIcons?: Record<string, ReactNode>;
503
+ /** Override the start menu's section grouping + virtual flyouts. */
504
+ categories?: StartMenuCategories;
505
+ /** Notification system config — when omitted, the bell isn't rendered. */
506
+ notifications?: NotificationsConfig;
507
+ /** Universal search config — when omitted, Cmd-K opens the picker but no
508
+ * results ever come back. */
509
+ search?: SearchConfig;
510
+ }
511
+ declare function Layout({ productName, productIcon, wallpapers, navSections, navIcons, sectionIcons, categories, notifications, search, }?: LayoutProps): react_jsx_runtime.JSX.Element;
512
+
513
+ interface StartMenuProps {
514
+ open: boolean;
515
+ onClose: () => void;
516
+ openPage: (path: string) => void;
517
+ openWindows: {
518
+ route?: string;
519
+ label: string;
520
+ }[];
521
+ profile: any;
522
+ user: any;
523
+ onLogout: () => void;
524
+ onNavigate: (path: string) => void;
525
+ taskbarPosition: 'top' | 'bottom' | 'left' | 'right';
526
+ taskbarH: number;
527
+ taskbarW?: number;
528
+ size?: 'small' | 'medium' | 'large';
529
+ /** Override the default nav sections (sections + top-level items). */
530
+ navSections?: (NavSection | NavItem)[];
531
+ /** Per-route icon map for items in the menu. */
532
+ navIcons?: Record<string, ReactNode>;
533
+ /** Per-section header icon map. */
534
+ sectionIcons?: Record<string, ReactNode>;
535
+ /** Section grouping + virtual flyouts (Utilities-style trays). */
536
+ categories?: StartMenuCategories;
537
+ }
538
+ declare function StartMenu({ open, onClose, openPage, profile, user, onLogout, taskbarPosition, taskbarH, taskbarW, size, navSections, navIcons, sectionIcons, categories, }: StartMenuProps): react_jsx_runtime.JSX.Element | null;
539
+
540
+ declare function Customization(): react_jsx_runtime.JSX.Element;
541
+
542
+ interface ShellAuth {
543
+ /** Returns true if the current user has any of the listed permission codes. */
544
+ hasAnyPerm: (perms: string[]) => boolean;
545
+ }
546
+ declare function ShellAuthProvider({ value, children }: {
547
+ value: ShellAuth;
548
+ children: ReactNode;
549
+ }): react_jsx_runtime.JSX.Element;
550
+ declare function useShellAuth(): ShellAuth;
551
+
552
+ interface ShellPrefsAdapter {
553
+ /** The current prefs object. The shell reads its known keys directly off
554
+ * this; consumer-private keys are ignored. */
555
+ prefs: Record<string, any>;
556
+ /** Patch a subset of prefs. The shell calls this with shallow diffs. */
557
+ save: (patch: Record<string, any>) => Promise<void> | void;
558
+ }
559
+ declare function ShellPrefsProvider({ value, children, }: {
560
+ value: ShellPrefsAdapter;
561
+ children: ReactNode;
562
+ }): react_jsx_runtime.JSX.Element;
563
+ /** Default localStorage-backed adapter — useful when the consumer doesn't
564
+ * ship a backend. Pass the result into <ShellPrefsProvider value={…}>. */
565
+ declare function useLocalStoragePrefs(storageKey?: string): ShellPrefsAdapter;
566
+ /** Returns the active prefs adapter. When no provider is mounted, returns a
567
+ * no-op adapter that reads as empty and silently drops saves — components
568
+ * still render, but persistence is a no-op. */
569
+ declare function useShellPrefs(): ShellPrefsAdapter;
570
+
571
+ type EntityFetcher = (endpoint: string, id: string) => Promise<any>;
572
+ declare function ShellEntityFetcherProvider({ value, children, }: {
573
+ value: EntityFetcher;
574
+ children: ReactNode;
575
+ }): react_jsx_runtime.JSX.Element;
576
+ /** Returns the consumer-supplied entity fetcher, or a stub that throws
577
+ * on call. Components that fetch entities call this hook eagerly so any
578
+ * misconfiguration surfaces synchronously rather than at click-time. */
579
+ declare function useShellEntityFetcher(): EntityFetcher;
580
+
581
+ /**
582
+ * INTERNAL stub — bridges legacy `apiClient.get/patch('/auth/me/', ...)` calls
583
+ * inside the shell to the new <ShellPrefsProvider> contract. This keeps the
584
+ * package's copied source compiling without rewriting every call site at
585
+ * once; consumer-supplied prefs flow through `<ShellPrefsProvider>`.
586
+ *
587
+ * Outside calls (anything not hitting `/auth/me/`) need the consumer to mount
588
+ * <ShellEntityFetcherProvider> and wire `entityFetcher` on <WindowManager>.
589
+ *
590
+ * Long-term this file is removed when each call site migrates to
591
+ * `useShellPrefs()` directly.
592
+ */
593
+
594
+ /** Consumer registers their own axios instance — typically the same one
595
+ * they use elsewhere. The package only delegates HTTP to this. */
596
+ declare function setShellApiClient(instance: AxiosInstance): void;
597
+
598
+ interface ShellUser {
599
+ email?: string;
600
+ first_name?: string;
601
+ last_name?: string;
602
+ avatar_url?: string;
603
+ }
604
+ /** Consumer registers user-identity + logout handler once at app startup. */
605
+ declare function setShellAuthBridge(bridge: {
606
+ user?: ShellUser;
607
+ logout?: () => void;
608
+ }): void;
609
+
610
+ /** Frosted glass style — shared across all menus, popups, and glass UI elements.
611
+ * Reads --menu-opacity CSS variable set by the theme system, and adapts the
612
+ * base tint to dark mode so menus don't stay light-cream when text is light. */
613
+ declare function glassStyle(opacity?: number): CSSProperties;
614
+ /** Glass divider border color */
615
+ declare const GLASS_DIVIDER = "border-white/20";
616
+ /** Glass input/search bar background */
617
+ declare const GLASS_INPUT_BG = "bg-white/15";
618
+
619
+ declare function reportBug(submit: BugReportConfig['submit']): Promise<void>;
620
+
621
+ /**
622
+ * Format a date string (YYYY-MM-DD or ISO timestamp) for display.
623
+ * Returns '—' for null/empty values.
624
+ */
625
+ declare function formatDate(value: string | null | undefined): string;
626
+
627
+ declare function useClickOutside(ref: RefObject<HTMLElement | null>, onClose: () => void): void;
628
+
629
+ /**
630
+ * Registers Alt+Shift+N (Windows) / Opt+Shift+N (Mac) hotkey to trigger a "New" action.
631
+ * Uses e.code (physical key) to avoid locale/modifier character issues.
632
+ */
633
+ declare function useNewHotkey(callback: () => void): void;
634
+
635
+ /**
636
+ * Registers Alt+Shift+E (Windows) / Opt+Shift+E (Mac) hotkey to trigger an "Edit" action.
637
+ * Uses e.code (physical key) to avoid locale/modifier character issues.
638
+ * Only fires for the active (frontmost) modal.
639
+ */
640
+ declare function useEditHotkey(callback: (() => void) | null): void;
641
+
642
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, ConfirmProvider, CopyButton, Customization, Desktop, type DesktopHostConfig, DesktopHostProvider, DocFavStar, ENTER, type EntityFetcher, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, Layout, type LayoutProps, MOD, Modal, ModalActions, NotificationBell, type NotificationsConfig, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, WindowManagerProvider, WindowRegistry, WindowTitle, confirm, confirmDestructive, createWindowRegistry, formatDate, glassStyle, isMac, openBugReportDialog, reportBug, setShellApiClient, setShellAuthBridge, setShellNavIcons, toast, useBugReport, useClickOutside, useDesktopHost, useEditHotkey, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };