react-os-shell 0.10.0 → 0.12.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 (51) hide show
  1. package/README.md +2 -1
  2. package/dist/{Browser-WVSS64J6.js → Browser-W63A4RUT.js} +3 -3
  3. package/dist/{Browser-WVSS64J6.js.map → Browser-W63A4RUT.js.map} +1 -1
  4. package/dist/{Calculator-37EIFRDU.js → Calculator-Z2DAZD6K.js} +4 -4
  5. package/dist/{Calculator-37EIFRDU.js.map → Calculator-Z2DAZD6K.js.map} +1 -1
  6. package/dist/{CurrencyConverter-PWX3FKRK.js → CurrencyConverter-S6RQB3OJ.js} +4 -4
  7. package/dist/{CurrencyConverter-PWX3FKRK.js.map → CurrencyConverter-S6RQB3OJ.js.map} +1 -1
  8. package/dist/{Documents-W2DABIOW.js → Documents-VE5Z7DRX.js} +3 -3
  9. package/dist/{Documents-W2DABIOW.js.map → Documents-VE5Z7DRX.js.map} +1 -1
  10. package/dist/Files-5IXGRZKM.js +11 -0
  11. package/dist/{Files-XNAPEBFF.js.map → Files-5IXGRZKM.js.map} +1 -1
  12. package/dist/{Minesweeper-M6HIJYPL.js → Minesweeper-WVAFWKCZ.js} +3 -3
  13. package/dist/{Minesweeper-M6HIJYPL.js.map → Minesweeper-WVAFWKCZ.js.map} +1 -1
  14. package/dist/{Notepad-MXEQCIC7.js → Notepad-OLNPHKTT.js} +3 -3
  15. package/dist/{Notepad-MXEQCIC7.js.map → Notepad-OLNPHKTT.js.map} +1 -1
  16. package/dist/{PomodoroTimer-5K55K26A.js → PomodoroTimer-ZJYDPFCT.js} +4 -4
  17. package/dist/{PomodoroTimer-5K55K26A.js.map → PomodoroTimer-ZJYDPFCT.js.map} +1 -1
  18. package/dist/Preview-LTZOUTQ7.js +8 -0
  19. package/dist/{Preview-VMKMY6SY.js.map → Preview-LTZOUTQ7.js.map} +1 -1
  20. package/dist/Spreadsheet-VT3ZISIN.js +6 -0
  21. package/dist/{Spreadsheet-UZMNMLZH.js.map → Spreadsheet-VT3ZISIN.js.map} +1 -1
  22. package/dist/{Stock-ZXZOCSJD.js → Stock-DWESS6UC.js} +4 -4
  23. package/dist/{Stock-ZXZOCSJD.js.map → Stock-DWESS6UC.js.map} +1 -1
  24. package/dist/{Weather-R6ULA547.js → Weather-NJHYEKH3.js} +4 -4
  25. package/dist/{Weather-R6ULA547.js.map → Weather-NJHYEKH3.js.map} +1 -1
  26. package/dist/{WorldClock-HHIBQXUR.js → WorldClock-UJKD253K.js} +4 -4
  27. package/dist/{WorldClock-HHIBQXUR.js.map → WorldClock-UJKD253K.js.map} +1 -1
  28. package/dist/apps/index.d.ts +1 -1
  29. package/dist/apps/index.js +18 -18
  30. package/dist/{chunk-SUUADOG6.js → chunk-3SIZAHR6.js} +4 -4
  31. package/dist/{chunk-SUUADOG6.js.map → chunk-3SIZAHR6.js.map} +1 -1
  32. package/dist/{chunk-ZETQWO2W.js → chunk-66GIT3PM.js} +3 -3
  33. package/dist/{chunk-ZETQWO2W.js.map → chunk-66GIT3PM.js.map} +1 -1
  34. package/dist/{chunk-LWVRQWGV.js → chunk-BS7EHYBT.js} +3 -3
  35. package/dist/{chunk-LWVRQWGV.js.map → chunk-BS7EHYBT.js.map} +1 -1
  36. package/dist/{chunk-KJ5664G7.js → chunk-DMSHU2HJ.js} +3 -3
  37. package/dist/{chunk-KJ5664G7.js.map → chunk-DMSHU2HJ.js.map} +1 -1
  38. package/dist/{chunk-CDSFAXIS.js → chunk-EFNKEBDB.js} +4 -4
  39. package/dist/{chunk-CDSFAXIS.js.map → chunk-EFNKEBDB.js.map} +1 -1
  40. package/dist/{chunk-3T6SQ4UO.js → chunk-IMFUTSYY.js} +5 -5
  41. package/dist/chunk-IMFUTSYY.js.map +1 -0
  42. package/dist/index.d.ts +51 -4
  43. package/dist/index.js +125 -35
  44. package/dist/index.js.map +1 -1
  45. package/dist/styles.css +15 -0
  46. package/dist/{types-D_4ifuf-.d.ts → types-BYiS2cc8.d.ts} +5 -0
  47. package/package.json +1 -1
  48. package/dist/Files-XNAPEBFF.js +0 -11
  49. package/dist/Preview-VMKMY6SY.js +0 -8
  50. package/dist/Spreadsheet-UZMNMLZH.js +0 -6
  51. package/dist/chunk-3T6SQ4UO.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { W as WindowRegistry } from './types-D_4ifuf-.js';
2
- export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-D_4ifuf-.js';
1
+ import { W as WindowRegistry } from './types-BYiS2cc8.js';
2
+ export { M as ModalRegistryEntry, P as PageRegistryEntry, a as WindowRegistryEntry, i as isEntityEntry, b as isPageEntry, s as setShellWindowRegistry } from './types-BYiS2cc8.js';
3
3
  import * as react from 'react';
4
4
  import react__default, { ReactNode, CSSProperties, Dispatch, SetStateAction, RefObject } from 'react';
5
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
@@ -200,6 +200,10 @@ interface ModalProps {
200
200
  * self-chromed apps like Preview, Files, Browser. Implies `bodyScroll: false`
201
201
  * — apps manage their own scrolling internally. */
202
202
  appStyle?: boolean;
203
+ /** Flush body: keeps the STANDARD full title bar and footer, but drops the
204
+ * body padding so the content sits flush to the window edges (e.g. a
205
+ * `<SidebarLayout>`). Implies `bodyScroll: false`. */
206
+ flushBody?: boolean;
203
207
  /** Auto-size height based on content. Window's height adapts to whatever the
204
208
  * body renders; combined with `autoMinHeight` to prevent collapse and capped
205
209
  * to the available viewport so nothing overflows the screen. Only set this
@@ -232,7 +236,7 @@ declare function setExposeHighlight(id: string | null): void;
232
236
  */
233
237
  declare function commitExposeHighlight(): void;
234
238
 
235
- declare function Modal({ open, onClose, title, icon, copyText, size, dirty, onNext, onPrev, footer, bodyScroll, onMinimize, initialBox, actions, actionsLeft, allowPinOnTop, initialPosition, widget, compact, appStyle, autoHeight, autoMinHeight, widgetMenu, dimensions, windowKey, openedFromKey, children }: ModalProps): react.ReactPortal | null;
239
+ declare function Modal({ open, onClose, title, icon, copyText, size, dirty, onNext, onPrev, footer, bodyScroll, onMinimize, initialBox, actions, actionsLeft, allowPinOnTop, initialPosition, widget, compact, appStyle, flushBody, autoHeight, autoMinHeight, widgetMenu, dimensions, windowKey, openedFromKey, children }: ModalProps): react.ReactPortal | null;
236
240
 
237
241
  /**
238
242
  * Unified popup menu component — used for all context menus, dropdowns, and flyouts.
@@ -450,6 +454,49 @@ interface EditableGridProps {
450
454
  */
451
455
  declare function EditableGrid({ columns, data, onChange, onColumnsChange, fixedRows, minRows, maxHeight, cellStyles, onFocusChange, onSelectionChange }: EditableGridProps): react_jsx_runtime.JSX.Element;
452
456
 
457
+ /**
458
+ * Two-pane layout with a drag-to-resize sidebar (left or right).
459
+ *
460
+ * Renders flush (`h-full w-full`) — pair it with a `flushBody` window so the
461
+ * sidebar runs from just under the title bar to the very bottom with no
462
+ * surrounding padding. The user can drag the sidebar's inner edge to resize
463
+ * it; pass `storageKey` to persist that width across reopens, or double-click
464
+ * the handle to reset to `defaultWidth`. Set `side="right"` to put the sidebar
465
+ * on the right (e.g. a detail-panel layout).
466
+ *
467
+ * @example
468
+ * <SidebarLayout sidebar={<MyNav />} storageKey="todo.sidebarWidth">
469
+ * <MyContent />
470
+ * </SidebarLayout>
471
+ */
472
+ interface SidebarLayoutProps {
473
+ /** Content of the left sidebar pane. */
474
+ sidebar: ReactNode;
475
+ /** Content of the main pane (opposite the sidebar). */
476
+ children: ReactNode;
477
+ /** Which side the sidebar sits on. Default `'left'`. When `'right'`, the
478
+ * sidebar renders on the right with the resize handle on its left edge. */
479
+ side?: 'left' | 'right';
480
+ /** localStorage key to persist the sidebar width across reopens. When set,
481
+ * the last dragged width is restored on mount. Omit for session-only width. */
482
+ storageKey?: string;
483
+ /** Initial sidebar width in px (used when nothing is persisted). Default 256. */
484
+ defaultWidth?: number;
485
+ /** Minimum sidebar width in px. Default 180. */
486
+ minWidth?: number;
487
+ /** Maximum sidebar width in px. Default 480. */
488
+ maxWidth?: number;
489
+ /** Extra classes for the outer flex row. */
490
+ className?: string;
491
+ /** Classes for the sidebar pane (background, border, …). The pane is a flex
492
+ * column that scrolls its own overflow. Defaults to a light-grey,
493
+ * right-bordered sidebar. */
494
+ sidebarClassName?: string;
495
+ /** Classes for the main content pane. Defaults to a white background. */
496
+ contentClassName?: string;
497
+ }
498
+ declare function SidebarLayout({ sidebar, children, side, storageKey, defaultWidth, minWidth, maxWidth, className, sidebarClassName, contentClassName, }: SidebarLayoutProps): react_jsx_runtime.JSX.Element;
499
+
453
500
  /** Generic notification shape consumed by the shell. Consumer-specific
454
501
  * fields live on `extra` (or just on additional properties — TS structural
455
502
  * typing is permissive). */
@@ -1390,4 +1437,4 @@ declare function useNewHotkey(callback: () => void): void;
1390
1437
  */
1391
1438
  declare function useEditHotkey(callback: (() => void) | null): void;
1392
1439
 
1393
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, DEV_BANNER_TEXT, Desktop, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Kanban, type KanbanColumn, type KanbanProps, Layout, type LayoutProps, ListFooter, MOD, Markdown, type MarkdownProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, VERSION, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isDevEnv, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
1440
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, type BugReport, type BugReportConfig, BugReportConfigProvider, BugReportDetail, type BugReportExtraField, type BugReportExtraSelectField, BugReportProvider, type BugReportSubmission, type BugReportSubmitPayload, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, CancelButton, type CellStyle, type ChangelogEntry, type ColumnDef, ConfirmProvider, CopyButton, Customization, type CustomizationOmitSection, type CustomizationProps, DEV_BANNER_TEXT, Desktop, type DesktopHostConfig, DesktopHostProvider, DevIndicator, DocFavStar, ENTER, EditableGrid, type EditableGridProps, type EntityFetcher, EntityList, type EntityListColumn, type EntityListProps, GLASS_DIVIDER, GLASS_INPUT_BG, GlobalSearch, type GridColumn, HelpCenter, type HelpCenterDoc, type HelpCenterProps, Kanban, type KanbanColumn, type KanbanProps, Layout, type LayoutProps, ListFooter, MOD, Markdown, type MarkdownProps, Modal, ModalActions, NotificationBell, type NotificationsConfig, type PaginatedResponse, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, type ReportType, ResizableTable, SHIFT, type SearchConfig, type SearchProvider, type SearchResult, type SemanticGroup, type ShellAuth, ShellAuthProvider, ShellEntityFetcherProvider, type ShellNotification, type ShellPrefsAdapter, ShellPrefsProvider, ShortcutHelp, SidebarLayout, type SidebarLayoutProps, type SortState, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, type StickyEntityRef, type StickyResolver, SystemPreferences, type SystemPreferencesProps, type SystemPreferencesSection, type TodoProvider, type TodoTask, VERSION, WidgetManager, WindowManagerProvider, WindowRegistry, WindowTitle, applyDevTitle, commitExposeHighlight, confirm, confirmDestructive, createWindowRegistry, exitExposeMode, formatDate, getActiveWindowRoute, getExposeHighlight, getWindowPosition, glassStyle, isDevEnv, isMac, openBugReportDialog, prompt, reportBug, setExposeHighlight, setShellApiClient, setShellAuthBridge, setShellNavIcons, setShellTodoProvider, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toast, toggleExposeMode, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useLocalStoragePrefs, useModalActive, useNewHotkey, useShellAuth, useShellEntityFetcher, useShellPrefs, useSort, useTableNav, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle };
package/dist/index.js CHANGED
@@ -4,15 +4,15 @@ import { subscribePomo, getPomoSnapshot } from './chunk-MK3HLUO4.js';
4
4
  export { setShellTodoProvider } from './chunk-QTJ2CHJX.js';
5
5
  import { useShellPrefs } from './chunk-36VM54SC.js';
6
6
  export { ShellPrefsProvider, useLocalStoragePrefs, useShellPrefs } from './chunk-36VM54SC.js';
7
- import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-SUUADOG6.js';
7
+ import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-3SIZAHR6.js';
8
8
  import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
9
- import { setPdfPreview } from './chunk-KJ5664G7.js';
9
+ import { setPdfPreview } from './chunk-DMSHU2HJ.js';
10
10
  import './chunk-KUIPWCTJ.js';
11
11
  import { toast_default } from './chunk-WIJ45SYD.js';
12
12
  export { toast_default as toast } from './chunk-WIJ45SYD.js';
13
- export { EditableGrid } from './chunk-ZETQWO2W.js';
14
- import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, WINDOW_REGISTRY, isPageEntry, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, setWindowPosition, ThumbCard, activateModal } from './chunk-3T6SQ4UO.js';
15
- export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-3T6SQ4UO.js';
13
+ export { EditableGrid } from './chunk-66GIT3PM.js';
14
+ import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, WINDOW_REGISTRY, isPageEntry, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, setWindowPosition, ThumbCard, activateModal } from './chunk-IMFUTSYY.js';
15
+ export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useModalActive, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-IMFUTSYY.js';
16
16
  import { confirm } from './chunk-UBN4IUDE.js';
17
17
  export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-UBN4IUDE.js';
18
18
  import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
@@ -560,6 +560,87 @@ function HelpCenter({
560
560
  ] }) : /* @__PURE__ */ jsx("div", { className: "flex-1 flex items-center justify-center px-6 text-center", children: /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500", children: loading ? "Loading\u2026" : "Pick a help article from the left." }) }) })
561
561
  ] });
562
562
  }
563
+ var clamp = (n, lo, hi) => Math.min(Math.max(n, lo), hi);
564
+ function SidebarLayout({
565
+ sidebar,
566
+ children,
567
+ side = "left",
568
+ storageKey,
569
+ defaultWidth = 256,
570
+ minWidth = 180,
571
+ maxWidth = 480,
572
+ className = "",
573
+ sidebarClassName = side === "right" ? "border-l border-gray-200 bg-gray-50" : "border-r border-gray-200 bg-gray-50",
574
+ contentClassName = "bg-white"
575
+ }) {
576
+ const sideRight = side === "right";
577
+ const [width, setWidth] = useState(() => {
578
+ if (storageKey && typeof window !== "undefined") {
579
+ const saved = window.localStorage.getItem(storageKey);
580
+ const n = saved ? parseInt(saved, 10) : NaN;
581
+ if (!Number.isNaN(n)) return clamp(n, minWidth, maxWidth);
582
+ }
583
+ return clamp(defaultWidth, minWidth, maxWidth);
584
+ });
585
+ const dragRef = useRef(null);
586
+ const onMove = useCallback((e) => {
587
+ const d = dragRef.current;
588
+ if (!d) return;
589
+ const delta = (e.clientX - d.startX) * (sideRight ? -1 : 1);
590
+ setWidth(clamp(d.startWidth + delta, minWidth, maxWidth));
591
+ }, [minWidth, maxWidth, sideRight]);
592
+ const onUp = useCallback(() => {
593
+ dragRef.current = null;
594
+ window.removeEventListener("pointermove", onMove);
595
+ window.removeEventListener("pointerup", onUp);
596
+ document.body.style.removeProperty("cursor");
597
+ document.body.style.removeProperty("user-select");
598
+ }, [onMove]);
599
+ const startDrag = useCallback((e) => {
600
+ e.preventDefault();
601
+ dragRef.current = { startX: e.clientX, startWidth: width };
602
+ window.addEventListener("pointermove", onMove);
603
+ window.addEventListener("pointerup", onUp);
604
+ document.body.style.cursor = "col-resize";
605
+ document.body.style.userSelect = "none";
606
+ }, [width, onMove, onUp]);
607
+ useEffect(() => {
608
+ if (!storageKey) return;
609
+ const id = window.setTimeout(() => {
610
+ try {
611
+ window.localStorage.setItem(storageKey, String(Math.round(width)));
612
+ } catch {
613
+ }
614
+ }, 200);
615
+ return () => window.clearTimeout(id);
616
+ }, [width, storageKey]);
617
+ useEffect(() => () => {
618
+ window.removeEventListener("pointermove", onMove);
619
+ window.removeEventListener("pointerup", onUp);
620
+ }, [onMove, onUp]);
621
+ const edge = sideRight ? "left-0" : "right-0";
622
+ const sidebarPane = /* @__PURE__ */ jsxs("div", { className: "relative flex h-full shrink-0 flex-col", style: { width }, children: [
623
+ /* @__PURE__ */ jsx("div", { className: `flex h-full flex-col overflow-y-auto ${sidebarClassName}`, children: sidebar }),
624
+ /* @__PURE__ */ jsx(
625
+ "div",
626
+ {
627
+ onPointerDown: startDrag,
628
+ onDoubleClick: () => setWidth(clamp(defaultWidth, minWidth, maxWidth)),
629
+ title: "Drag to resize \xB7 double-click to reset",
630
+ className: `group absolute inset-y-0 ${edge} z-10 w-2 cursor-col-resize`,
631
+ children: /* @__PURE__ */ jsx("div", { className: `absolute inset-y-0 ${edge} w-px bg-transparent transition-colors group-hover:bg-blue-400` })
632
+ }
633
+ )
634
+ ] });
635
+ const contentPane = /* @__PURE__ */ jsx("div", { className: `flex min-w-0 flex-1 flex-col ${contentClassName}`, children });
636
+ return /* @__PURE__ */ jsx("div", { className: `flex h-full w-full overflow-hidden ${className}`, children: sideRight ? /* @__PURE__ */ jsxs(Fragment, { children: [
637
+ contentPane,
638
+ sidebarPane
639
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
640
+ sidebarPane,
641
+ contentPane
642
+ ] }) });
643
+ }
563
644
  function timeAgo(dateStr) {
564
645
  const diff = Date.now() - new Date(dateStr).getTime();
565
646
  const mins = Math.floor(diff / 6e4);
@@ -1400,7 +1481,7 @@ function WidgetManager({ open, onClose }) {
1400
1481
  }
1401
1482
 
1402
1483
  // src/version.ts
1403
- var VERSION = "0.10.0" ;
1484
+ var VERSION = "0.12.0" ;
1404
1485
  var APP_VERSION = VERSION;
1405
1486
 
1406
1487
  // src/changelog.ts
@@ -5629,34 +5710,43 @@ function SystemPreferences({
5629
5710
  const initial = defaultSelected && sections2.some((s) => s.key === defaultSelected) ? defaultSelected : sections2[0]?.key ?? "";
5630
5711
  const [selected, setSelected] = useState(initial);
5631
5712
  const active = sections2.find((s) => s.key === selected) ?? sections2[0];
5632
- return /* @__PURE__ */ jsxs("div", { className: `flex h-full gap-4 px-4 py-3 min-h-0 ${className ?? ""}`.trim(), children: [
5633
- /* @__PURE__ */ jsx("aside", { className: "w-60 shrink-0 flex flex-col bg-white rounded-lg shadow overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto py-1", children: sections2.map((item) => {
5634
- const isActive = item.key === selected;
5635
- return /* @__PURE__ */ jsxs(
5636
- "button",
5637
- {
5638
- type: "button",
5639
- onClick: () => setSelected(item.key),
5640
- className: `w-full text-left px-3 py-2.5 text-sm transition-colors flex items-start gap-2.5 ${isActive ? "bg-blue-50 text-blue-700" : "hover:bg-gray-50 text-gray-700"}`,
5641
- children: [
5642
- item.icon && /* @__PURE__ */ jsx("span", { className: `mt-0.5 ${isActive ? "text-blue-600" : "text-gray-400"}`, children: item.icon }),
5643
- /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
5644
- /* @__PURE__ */ jsx(
5645
- "span",
5646
- {
5647
- className: `block ${isActive ? "font-semibold text-blue-700" : "font-medium text-gray-800"}`,
5648
- children: item.label
5649
- }
5650
- ),
5651
- item.description && /* @__PURE__ */ jsx("span", { className: "block text-[11px] text-gray-500 mt-0.5", children: item.description })
5652
- ] })
5653
- ]
5654
- },
5655
- item.key
5656
- );
5657
- }) }) }),
5658
- /* @__PURE__ */ jsx("main", { className: "flex-1 min-w-0 flex flex-col min-h-0 overflow-auto pr-2", children: active?.render() })
5659
- ] });
5713
+ return /* @__PURE__ */ jsx(
5714
+ SidebarLayout,
5715
+ {
5716
+ storageKey: "shell.systemPreferences.sidebarWidth",
5717
+ defaultWidth: 240,
5718
+ minWidth: 200,
5719
+ maxWidth: 360,
5720
+ className,
5721
+ sidebarClassName: "border-r border-gray-200 bg-gray-50",
5722
+ sidebar: /* @__PURE__ */ jsx("nav", { className: "py-1.5", children: sections2.map((item) => {
5723
+ const isActive = item.key === selected;
5724
+ return /* @__PURE__ */ jsxs(
5725
+ "button",
5726
+ {
5727
+ type: "button",
5728
+ onClick: () => setSelected(item.key),
5729
+ className: `w-full text-left px-3 py-2.5 text-sm transition-colors flex items-start gap-2.5 ${isActive ? "bg-blue-50 text-blue-700" : "hover:bg-gray-100 text-gray-700"}`,
5730
+ children: [
5731
+ item.icon && /* @__PURE__ */ jsx("span", { className: `mt-0.5 ${isActive ? "text-blue-600" : "text-gray-400"}`, children: item.icon }),
5732
+ /* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
5733
+ /* @__PURE__ */ jsx(
5734
+ "span",
5735
+ {
5736
+ className: `block ${isActive ? "font-semibold text-blue-700" : "font-medium text-gray-800"}`,
5737
+ children: item.label
5738
+ }
5739
+ ),
5740
+ item.description && /* @__PURE__ */ jsx("span", { className: "block text-[11px] text-gray-500 mt-0.5", children: item.description })
5741
+ ] })
5742
+ ]
5743
+ },
5744
+ item.key
5745
+ );
5746
+ }) }),
5747
+ children: /* @__PURE__ */ jsx("main", { className: "flex-1 min-w-0 overflow-auto p-4", children: active?.render() })
5748
+ }
5749
+ );
5660
5750
  }
5661
5751
  function useTableNav(items, onSelect, onToggle, onSelectAll, onSelectRange) {
5662
5752
  const [focusIdx, setFocusIdx] = useState(-1);
@@ -6499,6 +6589,6 @@ function useEditHotkey(callback) {
6499
6589
  }, [callback, isActive]);
6500
6590
  }
6501
6591
 
6502
- export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, DEV_BANNER_TEXT, Desktop, DesktopHostProvider, DevIndicator, ENTER, EntityList, GlobalSearch, HelpCenter, Kanban, Layout, ListFooter, MOD, Markdown, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, WidgetManager, applyDevTitle, createWindowRegistry, isDevEnv, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6592
+ export { ALT, ALT_SHIFT_D, ALT_SHIFT_E, ALT_SHIFT_N, BehaviorPanel, BugReportConfigProvider, BugReportDetail, BugReportProvider, CMD_A, CMD_DOT, CMD_ENTER, CMD_K, CMD_S, Customization, DEV_BANNER_TEXT, Desktop, DesktopHostProvider, DevIndicator, ENTER, EntityList, GlobalSearch, HelpCenter, Kanban, Layout, ListFooter, MOD, Markdown, NotificationBell, ResizableTable, SHIFT, ShellEntityFetcherProvider, ShortcutHelp, SidebarLayout, SoundsPanel, StartMenu, StatusBadge, StatusBadgeProvider, SystemPreferences, VERSION, WidgetManager, applyDevTitle, createWindowRegistry, isDevEnv, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6503
6593
  //# sourceMappingURL=index.js.map
6504
6594
  //# sourceMappingURL=index.js.map