react-os-shell 0.13.2 → 1.0.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 (67) hide show
  1. package/dist/{Browser-W63A4RUT.js → Browser-M5Y3ENA7.js} +3 -3
  2. package/dist/{Browser-W63A4RUT.js.map → Browser-M5Y3ENA7.js.map} +1 -1
  3. package/dist/{Calculator-Z2DAZD6K.js → Calculator-DJYKVGOK.js} +4 -4
  4. package/dist/{Calculator-Z2DAZD6K.js.map → Calculator-DJYKVGOK.js.map} +1 -1
  5. package/dist/{CurrencyConverter-S6RQB3OJ.js → CurrencyConverter-ZJWZCO5U.js} +4 -4
  6. package/dist/{CurrencyConverter-S6RQB3OJ.js.map → CurrencyConverter-ZJWZCO5U.js.map} +1 -1
  7. package/dist/{Documents-VE5Z7DRX.js → Documents-2S4QPAI3.js} +3 -3
  8. package/dist/{Documents-VE5Z7DRX.js.map → Documents-2S4QPAI3.js.map} +1 -1
  9. package/dist/Files-V4SZKOGZ.js +12 -0
  10. package/dist/{Files-5IXGRZKM.js.map → Files-V4SZKOGZ.js.map} +1 -1
  11. package/dist/{Minesweeper-WVAFWKCZ.js → Minesweeper-YNXOWMIP.js} +3 -3
  12. package/dist/{Minesweeper-WVAFWKCZ.js.map → Minesweeper-YNXOWMIP.js.map} +1 -1
  13. package/dist/{Notepad-OLNPHKTT.js → Notepad-6JJ4RT3U.js} +111 -102
  14. package/dist/Notepad-6JJ4RT3U.js.map +1 -0
  15. package/dist/{PomodoroTimer-ZJYDPFCT.js → PomodoroTimer-HGPJ5R6V.js} +5 -6
  16. package/dist/PomodoroTimer-HGPJ5R6V.js.map +1 -0
  17. package/dist/Preview-KUAQIPBY.js +8 -0
  18. package/dist/{Preview-LTZOUTQ7.js.map → Preview-KUAQIPBY.js.map} +1 -1
  19. package/dist/Spreadsheet-TVP3SXT6.js +6 -0
  20. package/dist/{Spreadsheet-VT3ZISIN.js.map → Spreadsheet-TVP3SXT6.js.map} +1 -1
  21. package/dist/Stock-XLC3LZJV.js +152 -0
  22. package/dist/Stock-XLC3LZJV.js.map +1 -0
  23. package/dist/{Weather-NJHYEKH3.js → Weather-WH3URRSL.js} +4 -4
  24. package/dist/{Weather-NJHYEKH3.js.map → Weather-WH3URRSL.js.map} +1 -1
  25. package/dist/{WorldClock-UJKD253K.js → WorldClock-LJRWPGJW.js} +4 -4
  26. package/dist/{WorldClock-UJKD253K.js.map → WorldClock-LJRWPGJW.js.map} +1 -1
  27. package/dist/apps/index.d.ts +16 -4
  28. package/dist/apps/index.js +22 -23
  29. package/dist/apps/index.js.map +1 -1
  30. package/dist/chunk-4R4SXMDV.js +98 -0
  31. package/dist/chunk-4R4SXMDV.js.map +1 -0
  32. package/dist/{chunk-IMFUTSYY.js → chunk-4RXDOSKZ.js} +22 -5
  33. package/dist/chunk-4RXDOSKZ.js.map +1 -0
  34. package/dist/{chunk-MK3HLUO4.js → chunk-5X5LQNOX.js} +172 -3
  35. package/dist/chunk-5X5LQNOX.js.map +1 -0
  36. package/dist/{chunk-66GIT3PM.js → chunk-6DDVFASF.js} +3 -3
  37. package/dist/{chunk-66GIT3PM.js.map → chunk-6DDVFASF.js.map} +1 -1
  38. package/dist/{chunk-BS7EHYBT.js → chunk-7TG7VNJS.js} +3 -3
  39. package/dist/{chunk-BS7EHYBT.js.map → chunk-7TG7VNJS.js.map} +1 -1
  40. package/dist/{chunk-DMSHU2HJ.js → chunk-K354WXU5.js} +3 -3
  41. package/dist/{chunk-DMSHU2HJ.js.map → chunk-K354WXU5.js.map} +1 -1
  42. package/dist/chunk-UXEG2NRI.js +682 -0
  43. package/dist/chunk-UXEG2NRI.js.map +1 -0
  44. package/dist/chunk-VGTEM5RZ.js +89 -0
  45. package/dist/chunk-VGTEM5RZ.js.map +1 -0
  46. package/dist/index.d.ts +69 -2
  47. package/dist/index.js +305 -346
  48. package/dist/index.js.map +1 -1
  49. package/dist/styles.css +26 -2
  50. package/package.json +1 -1
  51. package/dist/Files-5IXGRZKM.js +0 -11
  52. package/dist/Notepad-OLNPHKTT.js.map +0 -1
  53. package/dist/PomodoroTimer-ZJYDPFCT.js.map +0 -1
  54. package/dist/Preview-LTZOUTQ7.js +0 -8
  55. package/dist/Spreadsheet-VT3ZISIN.js +0 -6
  56. package/dist/Stock-DWESS6UC.js +0 -234
  57. package/dist/Stock-DWESS6UC.js.map +0 -1
  58. package/dist/TodoList-26N6ZTLN.js +0 -309
  59. package/dist/TodoList-26N6ZTLN.js.map +0 -1
  60. package/dist/chunk-3SIZAHR6.js +0 -46
  61. package/dist/chunk-3SIZAHR6.js.map +0 -1
  62. package/dist/chunk-EFNKEBDB.js +0 -605
  63. package/dist/chunk-EFNKEBDB.js.map +0 -1
  64. package/dist/chunk-IMFUTSYY.js.map +0 -1
  65. package/dist/chunk-MK3HLUO4.js.map +0 -1
  66. package/dist/chunk-QTJ2CHJX.js +0 -174
  67. package/dist/chunk-QTJ2CHJX.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,18 +1,21 @@
1
1
  import { formatDate } from './chunk-Y4QYGQKS.js';
2
2
  export { formatDate } from './chunk-Y4QYGQKS.js';
3
- import { subscribePomo, getPomoSnapshot } from './chunk-MK3HLUO4.js';
4
- export { setShellTodoProvider } from './chunk-QTJ2CHJX.js';
3
+ import { subscribePomo, getPomoSnapshot } from './chunk-5X5LQNOX.js';
4
+ export { setShellTodoProvider } from './chunk-5X5LQNOX.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-3SIZAHR6.js';
7
+ import { PREVIEW_OPENED_EVENT, openPreviewFile } from './chunk-4R4SXMDV.js';
8
+ export { Breadcrumbs } from './chunk-4R4SXMDV.js';
9
+ import { SidebarLayout } from './chunk-VGTEM5RZ.js';
10
+ export { SidebarLayout } from './chunk-VGTEM5RZ.js';
8
11
  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-DMSHU2HJ.js';
12
+ import { setPdfPreview } from './chunk-K354WXU5.js';
10
13
  import './chunk-KUIPWCTJ.js';
11
14
  import { toast_default } from './chunk-WIJ45SYD.js';
12
15
  export { toast_default as toast } from './chunk-WIJ45SYD.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
+ export { EditableGrid } from './chunk-6DDVFASF.js';
17
+ import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, Modal, WINDOW_REGISTRY, isPageEntry, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, setWindowPosition, ThumbCard, activateModal } from './chunk-4RXDOSKZ.js';
18
+ 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-4RXDOSKZ.js';
16
19
  import { confirm } from './chunk-UBN4IUDE.js';
17
20
  export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-UBN4IUDE.js';
18
21
  import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
@@ -560,86 +563,37 @@ function HelpCenter({
560
563
  ] }) : /* @__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
564
  ] });
562
565
  }
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);
566
+ function TopNav({ items, activeKey, onSelect, brand, actions, className }) {
567
+ return /* @__PURE__ */ jsxs(
568
+ "div",
569
+ {
570
+ className: `flex h-12 shrink-0 items-stretch gap-1 border-b border-gray-200 bg-white px-3 ${className ?? ""}`,
571
+ children: [
572
+ brand && /* @__PURE__ */ jsx("div", { className: "mr-1 flex items-center gap-2 pr-3 font-semibold text-gray-900", children: brand }),
573
+ /* @__PURE__ */ jsx("nav", { className: "flex items-stretch gap-0.5", children: items.map((item) => {
574
+ const active = item.key === activeKey;
575
+ return /* @__PURE__ */ jsxs(
576
+ "button",
577
+ {
578
+ type: "button",
579
+ disabled: item.disabled,
580
+ "aria-current": active ? "page" : void 0,
581
+ onClick: () => !item.disabled && onSelect?.(item.key),
582
+ className: `relative inline-flex items-center gap-1.5 px-3 text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${active ? "text-blue-600" : "text-gray-600 hover:text-gray-900"}`,
583
+ children: [
584
+ item.icon && /* @__PURE__ */ jsx("span", { className: "h-4 w-4 shrink-0", children: item.icon }),
585
+ /* @__PURE__ */ jsx("span", { className: "whitespace-nowrap", children: item.label }),
586
+ item.badge != null && /* @__PURE__ */ jsx("span", { className: "ml-0.5 inline-flex min-w-[1.25rem] items-center justify-center rounded-full bg-gray-100 px-1.5 text-[11px] font-semibold leading-5 text-gray-600", children: item.badge }),
587
+ active && /* @__PURE__ */ jsx("span", { className: "absolute inset-x-2 -bottom-px h-0.5 rounded-full bg-blue-600", "aria-hidden": true })
588
+ ]
589
+ },
590
+ item.key
591
+ );
592
+ }) }),
593
+ actions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-2", children: actions })
594
+ ]
582
595
  }
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/resize 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/resize:bg-[var(--accent-500,#3b82f6)]` })
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
- ] }) });
596
+ );
643
597
  }
644
598
  function timeAgo(dateStr) {
645
599
  const diff = Date.now() - new Date(dateStr).getTime();
@@ -1481,7 +1435,7 @@ function WidgetManager({ open, onClose }) {
1481
1435
  }
1482
1436
 
1483
1437
  // src/version.ts
1484
- var VERSION = "0.13.2" ;
1438
+ var VERSION = "1.0.0" ;
1485
1439
  var APP_VERSION = VERSION;
1486
1440
 
1487
1441
  // src/changelog.ts
@@ -2805,7 +2759,7 @@ function Desktop({ profile }) {
2805
2759
  openPage("/settings/customization");
2806
2760
  }, children: [
2807
2761
  /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-gray-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.53 16.122a3 3 0 00-5.78 1.128 2.25 2.25 0 01-2.4 2.245 4.5 4.5 0 008.4-2.245c0-.399-.078-.78-.22-1.128zm0 0a15.998 15.998 0 003.388-1.62m-5.043-.025a15.994 15.994 0 011.622-3.395m3.42 3.42a15.995 15.995 0 004.764-4.648l3.876-5.814a1.151 1.151 0 00-1.597-1.597L14.146 6.32a15.996 15.996 0 00-4.649 4.763m3.42 3.42a6.776 6.776 0 00-3.42-3.42" }) }),
2808
- "Customization"
2762
+ "Preferences"
2809
2763
  ] }),
2810
2764
  /* @__PURE__ */ jsxs(PopupMenuItem, { onClick: () => {
2811
2765
  setContextMenu(null);
@@ -4298,7 +4252,7 @@ function MobileProfileSheet({ profile, user, onClose, onNavigate, onLogout }) {
4298
4252
  /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z" }),
4299
4253
  /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z" })
4300
4254
  ] }) }),
4301
- /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm font-medium text-gray-800", children: "Customization" }),
4255
+ /* @__PURE__ */ jsx("span", { className: "flex-1 text-sm font-medium text-gray-800", children: "Preferences" }),
4302
4256
  /* @__PURE__ */ jsx("svg", { className: "h-4 w-4 text-gray-400 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8.25 4.5l7.5 7.5-7.5 7.5" }) })
4303
4257
  ]
4304
4258
  }
@@ -5070,8 +5024,9 @@ function previewColor(resolved, light, dark, pink, green, grey, blue) {
5070
5024
  if (resolved === "blue") return blue ?? light;
5071
5025
  return light;
5072
5026
  }
5073
- function Customization({ omit } = {}) {
5027
+ function Customization({ omit, section } = {}) {
5074
5028
  const omitSet = new Set(omit ?? []);
5029
+ const inSection = (group) => section === void 0 || section === group;
5075
5030
  const host = useDesktopHost();
5076
5031
  const WALLPAPERS = host.wallpapers && host.wallpapers.length > 0 ? host.wallpapers : DEFAULT_WALLPAPERS;
5077
5032
  const { prefs, save } = useShellPrefs();
@@ -5123,292 +5078,296 @@ function Customization({ omit } = {}) {
5123
5078
  const headerBg = previewColor(resolved, "bg-gray-100", "bg-[#313244]", "bg-pink-50", "bg-green-50", "bg-gray-300", "bg-blue-100");
5124
5079
  const accentBg = previewColor(resolved, "bg-blue-600", "bg-blue-500", "bg-pink-600", "bg-green-600", "bg-gray-700", "bg-blue-700");
5125
5080
  return /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
5126
- /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-gray-200 overflow-hidden", style: { width: 480 }, children: /* @__PURE__ */ jsxs("div", { className: "relative", style: { height: 300 }, children: [
5127
- isColor ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0", style: { backgroundColor: desktopBg } }) : /* @__PURE__ */ jsx("img", { src: desktopBg, alt: "", className: "absolute inset-0 w-full h-full object-cover" }),
5128
- /* @__PURE__ */ jsxs("div", { className: `absolute left-0 right-0 bottom-0 h-4 ${taskbarBg} border-t border-gray-200/50 flex items-center px-2 gap-1`, style: { opacity: prevTaskbarOpacity }, children: [
5129
- /* @__PURE__ */ jsx("div", { className: `h-2 w-8 rounded-sm ${accentBg}` }),
5130
- /* @__PURE__ */ jsx("div", { className: `h-2 w-6 rounded-sm ${iconBg}` })
5131
- ] }),
5132
- /* @__PURE__ */ jsx("div", { className: "absolute left-4 top-4 flex gap-4", children: [
5133
- { icon: "\u{1F4CB}", label: "Orders" },
5134
- { icon: "\u{1F4E6}", label: "Products" },
5135
- { icon: "\u{1F4CA}", label: "Reports" }
5136
- ].map((d) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5 w-8", children: [
5137
- /* @__PURE__ */ jsx("div", { className: "text-sm drop-shadow", children: d.icon }),
5138
- /* @__PURE__ */ jsx("span", { className: "text-[5px] text-white font-medium drop-shadow-[0_1px_1px_rgba(0,0,0,0.8)] leading-tight", children: d.label })
5139
- ] }, d.label)) }),
5140
- /* @__PURE__ */ jsxs("div", { className: `absolute rounded shadow-md ${winBg}`, style: { left: "35%", top: "20%", width: "55%", height: "55%" }, children: [
5141
- /* @__PURE__ */ jsxs("div", { className: `h-3 rounded-t ${headerBg} flex items-center px-1.5 gap-0.5`, style: { opacity: prevActiveHeaderOpacity }, children: [
5142
- /* @__PURE__ */ jsx("div", { className: "w-1 h-1 rounded-full bg-red-400" }),
5143
- /* @__PURE__ */ jsx("div", { className: "w-1 h-1 rounded-full bg-yellow-400" }),
5144
- /* @__PURE__ */ jsx("div", { className: "w-1 h-1 rounded-full bg-green-400" })
5081
+ inSection("appearance") && /* @__PURE__ */ jsxs(Fragment, { children: [
5082
+ /* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx("div", { className: "rounded-lg border border-gray-200 overflow-hidden", style: { width: 480 }, children: /* @__PURE__ */ jsxs("div", { className: "relative", style: { height: 300 }, children: [
5083
+ isColor ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0", style: { backgroundColor: desktopBg } }) : /* @__PURE__ */ jsx("img", { src: desktopBg, alt: "", className: "absolute inset-0 w-full h-full object-cover" }),
5084
+ /* @__PURE__ */ jsxs("div", { className: `absolute left-0 right-0 bottom-0 h-4 ${taskbarBg} border-t border-gray-200/50 flex items-center px-2 gap-1`, style: { opacity: prevTaskbarOpacity }, children: [
5085
+ /* @__PURE__ */ jsx("div", { className: `h-2 w-8 rounded-sm ${accentBg}` }),
5086
+ /* @__PURE__ */ jsx("div", { className: `h-2 w-6 rounded-sm ${iconBg}` })
5145
5087
  ] }),
5146
- /* @__PURE__ */ jsxs("div", { className: "p-1.5 space-y-1", style: { opacity: prevActiveContentOpacity }, children: [
5147
- /* @__PURE__ */ jsx("div", { className: `h-1 rounded w-3/4 ${iconBg}` }),
5148
- /* @__PURE__ */ jsx("div", { className: `h-1 rounded w-1/2 ${iconBg}` })
5088
+ /* @__PURE__ */ jsx("div", { className: "absolute left-4 top-4 flex gap-4", children: [
5089
+ { icon: "\u{1F4CB}", label: "Orders" },
5090
+ { icon: "\u{1F4E6}", label: "Products" },
5091
+ { icon: "\u{1F4CA}", label: "Reports" }
5092
+ ].map((d) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-0.5 w-8", children: [
5093
+ /* @__PURE__ */ jsx("div", { className: "text-sm drop-shadow", children: d.icon }),
5094
+ /* @__PURE__ */ jsx("span", { className: "text-[5px] text-white font-medium drop-shadow-[0_1px_1px_rgba(0,0,0,0.8)] leading-tight", children: d.label })
5095
+ ] }, d.label)) }),
5096
+ /* @__PURE__ */ jsxs("div", { className: `absolute rounded shadow-md ${winBg}`, style: { left: "35%", top: "20%", width: "55%", height: "55%" }, children: [
5097
+ /* @__PURE__ */ jsxs("div", { className: `h-3 rounded-t ${headerBg} flex items-center px-1.5 gap-0.5`, style: { opacity: prevActiveHeaderOpacity }, children: [
5098
+ /* @__PURE__ */ jsx("div", { className: "w-1 h-1 rounded-full bg-red-400" }),
5099
+ /* @__PURE__ */ jsx("div", { className: "w-1 h-1 rounded-full bg-yellow-400" }),
5100
+ /* @__PURE__ */ jsx("div", { className: "w-1 h-1 rounded-full bg-green-400" })
5101
+ ] }),
5102
+ /* @__PURE__ */ jsxs("div", { className: "p-1.5 space-y-1", style: { opacity: prevActiveContentOpacity }, children: [
5103
+ /* @__PURE__ */ jsx("div", { className: `h-1 rounded w-3/4 ${iconBg}` }),
5104
+ /* @__PURE__ */ jsx("div", { className: `h-1 rounded w-1/2 ${iconBg}` })
5105
+ ] })
5149
5106
  ] })
5150
- ] })
5151
- ] }) }) }),
5152
- /* @__PURE__ */ jsxs("div", { children: [
5153
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Theme" }),
5154
- /* @__PURE__ */ jsx("div", { className: "flex gap-3 flex-wrap", children: [...THEMES, { key: "custom", label: "Custom", bar1: "bg-gray-200", bar2: "bg-gray-200" }].map((t) => {
5155
- const isCustom2 = t.key === "custom";
5156
- const r = isCustom2 ? "light" : resolveTheme(t.key);
5157
- const customColor = prefs.accent_color || "#8b5cf6";
5158
- const tAccent = isCustom2 ? "" : previewColor(r, "bg-[#2563eb]", "bg-[#3b82f6]", "bg-[#db2777]", "bg-[#16a34a]", "bg-[#374151]", "bg-[#1d4ed8]");
5159
- const tBg = isCustom2 ? "bg-[#ffffff] border-[#d1d5db]" : previewColor(r, "bg-[#ffffff] border-[#d1d5db]", "bg-[#1e1e2e] border-[#45475a]", "bg-[#fdf2f8] border-[#f9a8d4]", "bg-[#f0fdf4] border-[#86efac]", "bg-[#e5e7eb] border-[#9ca3af]", "bg-[#eff6ff] border-[#93c5fd]");
5160
- return /* @__PURE__ */ jsxs(
5161
- "button",
5162
- {
5163
- onClick: () => {
5164
- if (isCustom2) {
5165
- savePref("theme", "light");
5166
- if (!prefs.accent_color) savePref("accent_color", "#8b5cf6");
5167
- } else {
5168
- savePref("theme", t.key);
5169
- savePref("accent_color", null);
5170
- }
5171
- },
5172
- className: `flex flex-col items-center gap-1.5 rounded-lg border-2 p-3 transition-all ${(isCustom2 ? !!prefs.accent_color : currentTheme === t.key && !prefs.accent_color) ? "border-blue-500 shadow-md" : "border-gray-200 hover:border-gray-300"}`,
5173
- children: [
5174
- /* @__PURE__ */ jsx("div", { className: `w-20 h-14 rounded ${tBg} border overflow-hidden flex flex-col`, children: t.key === "system" ? /* @__PURE__ */ jsxs("div", { className: "flex-1 flex", children: [
5175
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col bg-[#ffffff]", children: [
5176
- /* @__PURE__ */ jsx("div", { className: "h-2 bg-[#2563eb] w-full" }),
5177
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex gap-0.5 p-0.5", children: [
5178
- /* @__PURE__ */ jsx("div", { className: "w-3 rounded-sm bg-[#f3f4f6]" }),
5179
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5180
- /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-3/4 bg-[#e5e7eb]" }),
5181
- /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-1/2 bg-[#e5e7eb]" })
5107
+ ] }) }) }),
5108
+ /* @__PURE__ */ jsxs("div", { children: [
5109
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Theme" }),
5110
+ /* @__PURE__ */ jsx("div", { className: "flex gap-3 flex-wrap", children: [...THEMES, { key: "custom", label: "Custom", bar1: "bg-gray-200", bar2: "bg-gray-200" }].map((t) => {
5111
+ const isCustom2 = t.key === "custom";
5112
+ const r = isCustom2 ? "light" : resolveTheme(t.key);
5113
+ const customColor = prefs.accent_color || "#8b5cf6";
5114
+ const tAccent = isCustom2 ? "" : previewColor(r, "bg-[#2563eb]", "bg-[#3b82f6]", "bg-[#db2777]", "bg-[#16a34a]", "bg-[#374151]", "bg-[#1d4ed8]");
5115
+ const tBg = isCustom2 ? "bg-[#ffffff] border-[#d1d5db]" : previewColor(r, "bg-[#ffffff] border-[#d1d5db]", "bg-[#1e1e2e] border-[#45475a]", "bg-[#fdf2f8] border-[#f9a8d4]", "bg-[#f0fdf4] border-[#86efac]", "bg-[#e5e7eb] border-[#9ca3af]", "bg-[#eff6ff] border-[#93c5fd]");
5116
+ return /* @__PURE__ */ jsxs(
5117
+ "button",
5118
+ {
5119
+ onClick: () => {
5120
+ if (isCustom2) {
5121
+ savePref("theme", "light");
5122
+ if (!prefs.accent_color) savePref("accent_color", "#8b5cf6");
5123
+ } else {
5124
+ savePref("theme", t.key);
5125
+ savePref("accent_color", null);
5126
+ }
5127
+ },
5128
+ className: `flex flex-col items-center gap-1.5 rounded-lg border-2 p-3 transition-all ${(isCustom2 ? !!prefs.accent_color : currentTheme === t.key && !prefs.accent_color) ? "border-blue-500 shadow-md" : "border-gray-200 hover:border-gray-300"}`,
5129
+ children: [
5130
+ /* @__PURE__ */ jsx("div", { className: `w-20 h-14 rounded ${tBg} border overflow-hidden flex flex-col`, children: t.key === "system" ? /* @__PURE__ */ jsxs("div", { className: "flex-1 flex", children: [
5131
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col bg-[#ffffff]", children: [
5132
+ /* @__PURE__ */ jsx("div", { className: "h-2 bg-[#2563eb] w-full" }),
5133
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex gap-0.5 p-0.5", children: [
5134
+ /* @__PURE__ */ jsx("div", { className: "w-3 rounded-sm bg-[#f3f4f6]" }),
5135
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5136
+ /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-3/4 bg-[#e5e7eb]" }),
5137
+ /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-1/2 bg-[#e5e7eb]" })
5138
+ ] })
5139
+ ] })
5140
+ ] }),
5141
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col bg-[#1e1e2e]", children: [
5142
+ /* @__PURE__ */ jsx("div", { className: "h-2 bg-[#3b82f6] w-full" }),
5143
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex gap-0.5 p-0.5", children: [
5144
+ /* @__PURE__ */ jsx("div", { className: "w-3 rounded-sm bg-[#313244]" }),
5145
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5146
+ /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-3/4 bg-[#45475a]" }),
5147
+ /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-1/2 bg-[#45475a]" })
5148
+ ] })
5182
5149
  ] })
5183
5150
  ] })
5184
- ] }),
5185
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col bg-[#1e1e2e]", children: [
5186
- /* @__PURE__ */ jsx("div", { className: "h-2 bg-[#3b82f6] w-full" }),
5187
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex gap-0.5 p-0.5", children: [
5188
- /* @__PURE__ */ jsx("div", { className: "w-3 rounded-sm bg-[#313244]" }),
5151
+ ] }) : isCustom2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
5152
+ /* @__PURE__ */ jsx("div", { className: "h-2 w-full", style: { backgroundColor: customColor } }),
5153
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 flex gap-0.5 p-1", children: [
5154
+ /* @__PURE__ */ jsx("div", { className: "w-4 rounded-sm bg-[#f3f4f6]" }),
5189
5155
  /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5190
- /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-3/4 bg-[#45475a]" }),
5191
- /* @__PURE__ */ jsx("div", { className: "h-1 rounded-sm w-1/2 bg-[#45475a]" })
5156
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 rounded-sm w-3/4 bg-[#e5e7eb]" }),
5157
+ /* @__PURE__ */ jsx("div", { className: "h-1.5 rounded-sm w-1/2 bg-[#e5e7eb]" })
5192
5158
  ] })
5193
5159
  ] })
5194
- ] })
5195
- ] }) : isCustom2 ? /* @__PURE__ */ jsxs(Fragment, { children: [
5196
- /* @__PURE__ */ jsx("div", { className: "h-2 w-full", style: { backgroundColor: customColor } }),
5197
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex gap-0.5 p-1", children: [
5198
- /* @__PURE__ */ jsx("div", { className: "w-4 rounded-sm bg-[#f3f4f6]" }),
5199
- /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5200
- /* @__PURE__ */ jsx("div", { className: "h-1.5 rounded-sm w-3/4 bg-[#e5e7eb]" }),
5201
- /* @__PURE__ */ jsx("div", { className: "h-1.5 rounded-sm w-1/2 bg-[#e5e7eb]" })
5202
- ] })
5203
- ] })
5204
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5205
- /* @__PURE__ */ jsx("div", { className: `h-2 ${tAccent} w-full` }),
5206
- /* @__PURE__ */ jsx("div", { className: "flex-1 flex gap-0.5 p-1", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5207
- /* @__PURE__ */ jsx("div", { className: `h-1.5 rounded-sm w-3/4 ${t.bar1}` }),
5208
- /* @__PURE__ */ jsx("div", { className: `h-1.5 rounded-sm w-1/2 ${t.bar2}` })
5209
- ] }) })
5210
- ] }) }),
5211
- /* @__PURE__ */ jsx("span", { className: `text-xs font-medium ${(isCustom2 ? !!prefs.accent_color : currentTheme === t.key && !prefs.accent_color) ? "text-blue-600" : "text-gray-600"}`, children: t.label })
5212
- ]
5213
- },
5214
- t.key
5215
- );
5216
- }) }),
5217
- prefs.accent_color && /* @__PURE__ */ jsx("div", { className: "mt-3 space-y-2", children: [
5218
- { key: "custom_bg_color", label: "Background Color", defaultVal: "#f3f4f6" },
5219
- { key: "custom_title_color", label: "Title Color", defaultVal: "#f9fafb" },
5220
- { key: "custom_window_color", label: "Windows Background", defaultVal: "#ffffff" },
5221
- { key: "custom_button_color", label: "Button Color", defaultVal: "#2563eb" },
5222
- { key: "accent_color", label: "Accent Color", defaultVal: "#8b5cf6" }
5223
- ].map((item) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5224
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-40 shrink-0", children: item.label }),
5225
- /* @__PURE__ */ jsx(
5226
- "label",
5227
- {
5228
- className: "w-8 h-8 rounded-lg border-2 border-gray-300 overflow-hidden cursor-pointer flex items-center justify-center shrink-0",
5229
- style: { backgroundColor: prefs[item.key] || item.defaultVal },
5230
- children: /* @__PURE__ */ jsx(
5231
- "input",
5232
- {
5233
- type: "color",
5234
- value: prefs[item.key] || item.defaultVal,
5235
- onChange: (e) => savePref(item.key, e.target.value),
5236
- className: "opacity-0 absolute w-0 h-0"
5237
- }
5238
- )
5239
- }
5240
- ),
5241
- /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 font-mono", children: prefs[item.key] || item.defaultVal })
5242
- ] }, item.key)) })
5243
- ] }),
5244
- /* @__PURE__ */ jsxs("div", { children: [
5245
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Desktop Wallpaper" }),
5246
- /* @__PURE__ */ jsxs("div", { className: "flex gap-2 flex-wrap items-center", children: [
5247
- /* @__PURE__ */ jsx(
5248
- "button",
5249
- {
5250
- onClick: () => savePref("desktop_bg", "none"),
5251
- className: `w-28 h-20 rounded border-2 overflow-hidden flex items-center justify-center ${rawBg === "none" ? "border-blue-500" : "border-gray-300"}`,
5252
- style: { backgroundColor: previewColor(resolved, "#f3f4f6", "#1e1e2e", "#fdf2f8", "#f0fdf4", "#d1d5db", "#eff6ff") },
5253
- children: /* @__PURE__ */ jsx("span", { className: "text-[9px] text-gray-500", children: "None" })
5254
- }
5255
- ),
5256
- /* @__PURE__ */ jsx(
5257
- "button",
5258
- {
5259
- onClick: () => savePref("desktop_bg", "random"),
5260
- className: `w-28 h-20 rounded border-2 overflow-hidden flex items-center justify-center ${rawBg === "random" ? "border-blue-500" : "border-gray-300"}`,
5261
- children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 grid-rows-2 w-full h-full", children: WALLPAPERS.slice(0, 4).map((wp) => /* @__PURE__ */ jsx("img", { src: wp.src, alt: "", loading: "lazy", className: "w-full h-full object-cover" }, wp.src)) })
5262
- }
5263
- ),
5264
- WALLPAPERS.map((wp) => /* @__PURE__ */ jsx(
5265
- "button",
5266
- {
5267
- onClick: () => savePref("desktop_bg", wp.src),
5268
- className: `w-28 h-20 rounded border-2 overflow-hidden ${rawBg === wp.src ? "border-blue-500" : "border-gray-300"}`,
5269
- children: /* @__PURE__ */ jsx("img", { src: wp.src, alt: wp.label, loading: "lazy", className: "w-full h-full object-cover" })
5270
- },
5271
- wp.src
5272
- )),
5273
- (customBg || isCustom) && /* @__PURE__ */ jsxs("div", { className: "relative group", children: [
5160
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5161
+ /* @__PURE__ */ jsx("div", { className: `h-2 ${tAccent} w-full` }),
5162
+ /* @__PURE__ */ jsx("div", { className: "flex-1 flex gap-0.5 p-1", children: /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0.5", children: [
5163
+ /* @__PURE__ */ jsx("div", { className: `h-1.5 rounded-sm w-3/4 ${t.bar1}` }),
5164
+ /* @__PURE__ */ jsx("div", { className: `h-1.5 rounded-sm w-1/2 ${t.bar2}` })
5165
+ ] }) })
5166
+ ] }) }),
5167
+ /* @__PURE__ */ jsx("span", { className: `text-xs font-medium ${(isCustom2 ? !!prefs.accent_color : currentTheme === t.key && !prefs.accent_color) ? "text-blue-600" : "text-gray-600"}`, children: t.label })
5168
+ ]
5169
+ },
5170
+ t.key
5171
+ );
5172
+ }) }),
5173
+ prefs.accent_color && /* @__PURE__ */ jsx("div", { className: "mt-3 space-y-2", children: [
5174
+ { key: "custom_bg_color", label: "Background Color", defaultVal: "#f3f4f6" },
5175
+ { key: "custom_title_color", label: "Title Color", defaultVal: "#f9fafb" },
5176
+ { key: "custom_window_color", label: "Windows Background", defaultVal: "#ffffff" },
5177
+ { key: "custom_button_color", label: "Button Color", defaultVal: "#2563eb" },
5178
+ { key: "accent_color", label: "Accent Color", defaultVal: "#8b5cf6" }
5179
+ ].map((item) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5180
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-40 shrink-0", children: item.label }),
5274
5181
  /* @__PURE__ */ jsx(
5275
- "button",
5182
+ "label",
5276
5183
  {
5277
- onClick: () => savePref("desktop_bg", customBg || desktopBg),
5278
- className: `w-28 h-20 rounded border-2 overflow-hidden ${isCustom ? "border-blue-500" : "border-gray-300"}`,
5279
- children: /* @__PURE__ */ jsx("img", { src: customBg || desktopBg, alt: "Custom", loading: "lazy", className: "w-full h-full object-cover" })
5184
+ className: "w-8 h-8 rounded-lg border-2 border-gray-300 overflow-hidden cursor-pointer flex items-center justify-center shrink-0",
5185
+ style: { backgroundColor: prefs[item.key] || item.defaultVal },
5186
+ children: /* @__PURE__ */ jsx(
5187
+ "input",
5188
+ {
5189
+ type: "color",
5190
+ value: prefs[item.key] || item.defaultVal,
5191
+ onChange: (e) => savePref(item.key, e.target.value),
5192
+ className: "opacity-0 absolute w-0 h-0"
5193
+ }
5194
+ )
5280
5195
  }
5281
5196
  ),
5197
+ /* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 font-mono", children: prefs[item.key] || item.defaultVal })
5198
+ ] }, item.key)) })
5199
+ ] }),
5200
+ /* @__PURE__ */ jsxs("div", { children: [
5201
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Desktop Wallpaper" }),
5202
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-2 flex-wrap items-center", children: [
5282
5203
  /* @__PURE__ */ jsx(
5283
5204
  "button",
5284
5205
  {
5285
- onClick: () => save({ desktop_bg: "random", desktop_bg_custom: "" }),
5286
- className: "absolute -top-1.5 -right-1.5 h-4 w-4 rounded-full bg-red-500 text-white flex items-center justify-center text-[10px] leading-none opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-600 shadow",
5287
- children: "\xD7"
5206
+ onClick: () => savePref("desktop_bg", "none"),
5207
+ className: `w-28 h-20 rounded border-2 overflow-hidden flex items-center justify-center ${rawBg === "none" ? "border-blue-500" : "border-gray-300"}`,
5208
+ style: { backgroundColor: previewColor(resolved, "#f3f4f6", "#1e1e2e", "#fdf2f8", "#f0fdf4", "#d1d5db", "#eff6ff") },
5209
+ children: /* @__PURE__ */ jsx("span", { className: "text-[9px] text-gray-500", children: "None" })
5288
5210
  }
5289
- )
5290
- ] }),
5291
- /* @__PURE__ */ jsxs("label", { className: "w-28 h-20 rounded border-2 border-gray-300 border-dashed overflow-hidden cursor-pointer flex items-center justify-center text-gray-400 hover:text-gray-600", children: [
5292
- /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }),
5293
- /* @__PURE__ */ jsx("input", { type: "file", accept: "image/*", className: "hidden", onChange: (e) => {
5294
- const file = e.target.files?.[0];
5295
- if (!file) return;
5296
- const reader = new FileReader();
5297
- reader.onloadend = () => {
5298
- if (reader.result) {
5299
- save({ desktop_bg: reader.result, desktop_bg_custom: reader.result });
5300
- }
5301
- };
5302
- reader.readAsDataURL(file);
5303
- } })
5304
- ] })
5305
- ] })
5306
- ] }),
5307
- /* @__PURE__ */ jsxs("div", { children: [
5308
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Transparency" }),
5309
- /* @__PURE__ */ jsx("div", { className: "space-y-3", children: [
5310
- { key: "transparency_taskbar", label: "Taskbar", defaultVal: 70 },
5311
- { key: "transparency_start_menu", label: "Start Menu", defaultVal: 70 },
5312
- { key: "transparency_inactive_header", label: "Inactive Windows Header / Footer", defaultVal: 70 },
5313
- { key: "transparency_inactive_content", label: "Inactive Windows Content", defaultVal: 80 },
5314
- { key: "transparency_active_header", label: "Active Windows Header / Footer", defaultVal: 80 },
5315
- { key: "transparency_active_content", label: "Active Windows Content", defaultVal: 90 }
5316
- ].map((item) => {
5317
- const val = localSliders[item.key] ?? prefs[item.key] ?? item.defaultVal;
5318
- return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5319
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-64 shrink-0", children: item.label }),
5211
+ ),
5320
5212
  /* @__PURE__ */ jsx(
5321
- "input",
5213
+ "button",
5322
5214
  {
5323
- type: "range",
5324
- min: 20,
5325
- max: 100,
5326
- value: val,
5327
- onChange: (e) => saveSlider(item.key, Number(e.target.value)),
5328
- className: "flex-1 h-1.5 accent-blue-600 cursor-pointer"
5215
+ onClick: () => savePref("desktop_bg", "random"),
5216
+ className: `w-28 h-20 rounded border-2 overflow-hidden flex items-center justify-center ${rawBg === "random" ? "border-blue-500" : "border-gray-300"}`,
5217
+ children: /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 grid-rows-2 w-full h-full", children: WALLPAPERS.slice(0, 4).map((wp) => /* @__PURE__ */ jsx("img", { src: wp.src, alt: "", loading: "lazy", className: "w-full h-full object-cover" }, wp.src)) })
5329
5218
  }
5330
5219
  ),
5331
- /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 w-10 text-right font-mono", children: [
5332
- val,
5333
- "%"
5220
+ WALLPAPERS.map((wp) => /* @__PURE__ */ jsx(
5221
+ "button",
5222
+ {
5223
+ onClick: () => savePref("desktop_bg", wp.src),
5224
+ className: `w-28 h-20 rounded border-2 overflow-hidden ${rawBg === wp.src ? "border-blue-500" : "border-gray-300"}`,
5225
+ children: /* @__PURE__ */ jsx("img", { src: wp.src, alt: wp.label, loading: "lazy", className: "w-full h-full object-cover" })
5226
+ },
5227
+ wp.src
5228
+ )),
5229
+ (customBg || isCustom) && /* @__PURE__ */ jsxs("div", { className: "relative group", children: [
5230
+ /* @__PURE__ */ jsx(
5231
+ "button",
5232
+ {
5233
+ onClick: () => savePref("desktop_bg", customBg || desktopBg),
5234
+ className: `w-28 h-20 rounded border-2 overflow-hidden ${isCustom ? "border-blue-500" : "border-gray-300"}`,
5235
+ children: /* @__PURE__ */ jsx("img", { src: customBg || desktopBg, alt: "Custom", loading: "lazy", className: "w-full h-full object-cover" })
5236
+ }
5237
+ ),
5238
+ /* @__PURE__ */ jsx(
5239
+ "button",
5240
+ {
5241
+ onClick: () => save({ desktop_bg: "random", desktop_bg_custom: "" }),
5242
+ className: "absolute -top-1.5 -right-1.5 h-4 w-4 rounded-full bg-red-500 text-white flex items-center justify-center text-[10px] leading-none opacity-0 group-hover:opacity-100 transition-opacity hover:bg-red-600 shadow",
5243
+ children: "\xD7"
5244
+ }
5245
+ )
5246
+ ] }),
5247
+ /* @__PURE__ */ jsxs("label", { className: "w-28 h-20 rounded border-2 border-gray-300 border-dashed overflow-hidden cursor-pointer flex items-center justify-center text-gray-400 hover:text-gray-600", children: [
5248
+ /* @__PURE__ */ jsx("svg", { className: "h-5 w-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 1.5, children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" }) }),
5249
+ /* @__PURE__ */ jsx("input", { type: "file", accept: "image/*", className: "hidden", onChange: (e) => {
5250
+ const file = e.target.files?.[0];
5251
+ if (!file) return;
5252
+ const reader = new FileReader();
5253
+ reader.onloadend = () => {
5254
+ if (reader.result) {
5255
+ save({ desktop_bg: reader.result, desktop_bg_custom: reader.result });
5256
+ }
5257
+ };
5258
+ reader.readAsDataURL(file);
5259
+ } })
5334
5260
  ] })
5335
- ] }, item.key);
5336
- }) })
5337
- ] }),
5338
- /* @__PURE__ */ jsxs("div", { children: [
5339
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Layout Mode" }),
5340
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mb-3", children: "Sidebar mode is designed for small screens \u2014 windows always run maximized and the start menu lives in a persistent left sidebar (sections expand inline instead of opening flyouts)." }),
5341
- /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [
5342
- { key: "classic", label: "Classic" },
5343
- { key: "sidebar", label: "Sidebar" }
5344
- ].map((m) => /* @__PURE__ */ jsx(
5345
- "button",
5346
- {
5347
- onClick: () => {
5348
- savePref("layout_mode", m.key);
5349
- if (m.key === "sidebar") savePref("default_window_size", "maximized");
5350
- },
5351
- className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${(prefs.layout_mode || "classic") === m.key ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5352
- children: m.label
5353
- },
5354
- m.key
5355
- )) })
5261
+ ] })
5262
+ ] }),
5263
+ /* @__PURE__ */ jsxs("div", { children: [
5264
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Transparency" }),
5265
+ /* @__PURE__ */ jsx("div", { className: "space-y-3", children: [
5266
+ { key: "transparency_taskbar", label: "Taskbar", defaultVal: 70 },
5267
+ { key: "transparency_start_menu", label: "Start Menu", defaultVal: 70 },
5268
+ { key: "transparency_inactive_header", label: "Inactive Windows Header / Footer", defaultVal: 70 },
5269
+ { key: "transparency_inactive_content", label: "Inactive Windows Content", defaultVal: 80 },
5270
+ { key: "transparency_active_header", label: "Active Windows Header / Footer", defaultVal: 80 },
5271
+ { key: "transparency_active_content", label: "Active Windows Content", defaultVal: 90 }
5272
+ ].map((item) => {
5273
+ const val = localSliders[item.key] ?? prefs[item.key] ?? item.defaultVal;
5274
+ return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5275
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-64 shrink-0", children: item.label }),
5276
+ /* @__PURE__ */ jsx(
5277
+ "input",
5278
+ {
5279
+ type: "range",
5280
+ min: 20,
5281
+ max: 100,
5282
+ value: val,
5283
+ onChange: (e) => saveSlider(item.key, Number(e.target.value)),
5284
+ className: "flex-1 h-1.5 accent-blue-600 cursor-pointer"
5285
+ }
5286
+ ),
5287
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-gray-500 w-10 text-right font-mono", children: [
5288
+ val,
5289
+ "%"
5290
+ ] })
5291
+ ] }, item.key);
5292
+ }) })
5293
+ ] })
5356
5294
  ] }),
5357
- /* @__PURE__ */ jsxs("div", { children: [
5358
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Taskbar" }),
5359
- /* @__PURE__ */ jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5360
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-24 shrink-0", children: "Position" }),
5361
- /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: ["bottom", "top", "left", "right"].map((pos) => /* @__PURE__ */ jsx(
5295
+ inSection("layout") && /* @__PURE__ */ jsxs(Fragment, { children: [
5296
+ /* @__PURE__ */ jsxs("div", { children: [
5297
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Layout Mode" }),
5298
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mb-3", children: "Sidebar mode is designed for small screens \u2014 windows always run maximized and the start menu lives in a persistent left sidebar (sections expand inline instead of opening flyouts)." }),
5299
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [
5300
+ { key: "classic", label: "Classic" },
5301
+ { key: "sidebar", label: "Sidebar" }
5302
+ ].map((m) => /* @__PURE__ */ jsx(
5362
5303
  "button",
5363
5304
  {
5364
- onClick: () => savePref("taskbar_position", pos),
5365
- disabled: prefs.layout_mode === "sidebar",
5366
- title: prefs.layout_mode === "sidebar" ? "Sidebar mode forces a horizontal taskbar." : void 0,
5367
- className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${(prefs.taskbar_position || "bottom") === pos ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5368
- children: pos.charAt(0).toUpperCase() + pos.slice(1)
5305
+ onClick: () => {
5306
+ savePref("layout_mode", m.key);
5307
+ if (m.key === "sidebar") savePref("default_window_size", "maximized");
5308
+ },
5309
+ className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${(prefs.layout_mode || "classic") === m.key ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5310
+ children: m.label
5369
5311
  },
5370
- pos
5312
+ m.key
5371
5313
  )) })
5372
- ] }) })
5373
- ] }),
5374
- /* @__PURE__ */ jsxs("div", { children: [
5375
- /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Menu" }),
5376
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mb-3", children: "Controls font size, padding, taskbar height, and window button height across the Start Menu, context menus, dropdowns, and the notification popup." }),
5377
- /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
5378
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5379
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-24 shrink-0", children: "Size" }),
5380
- /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [
5381
- { key: "small", label: "Small" },
5382
- { key: "medium", label: "Medium" },
5383
- { key: "large", label: "Large" }
5384
- ].map((s) => /* @__PURE__ */ jsx(
5385
- "button",
5386
- {
5387
- onClick: () => savePref("start_menu_size", s.key),
5388
- className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${(prefs.start_menu_size || "medium") === s.key ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5389
- children: s.label
5390
- },
5391
- s.key
5392
- )) })
5393
- ] }),
5394
- /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5395
- /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-24 shrink-0", children: "Density" }),
5396
- /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [
5397
- { key: "tight", label: "Tight" },
5398
- { key: "normal", label: "Normal" }
5399
- ].map((s) => /* @__PURE__ */ jsx(
5314
+ ] }),
5315
+ /* @__PURE__ */ jsxs("div", { children: [
5316
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Taskbar" }),
5317
+ /* @__PURE__ */ jsx("div", { className: "space-y-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5318
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-24 shrink-0", children: "Position" }),
5319
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: ["bottom", "top", "left", "right"].map((pos) => /* @__PURE__ */ jsx(
5400
5320
  "button",
5401
5321
  {
5402
- onClick: () => savePref("menu_density", s.key),
5403
- className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${(prefs.menu_density || "normal") === s.key ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5404
- children: s.label
5322
+ onClick: () => savePref("taskbar_position", pos),
5323
+ disabled: prefs.layout_mode === "sidebar",
5324
+ title: prefs.layout_mode === "sidebar" ? "Sidebar mode forces a horizontal taskbar." : void 0,
5325
+ className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors disabled:opacity-40 disabled:cursor-not-allowed ${(prefs.taskbar_position || "bottom") === pos ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5326
+ children: pos.charAt(0).toUpperCase() + pos.slice(1)
5405
5327
  },
5406
- s.key
5328
+ pos
5407
5329
  )) })
5330
+ ] }) })
5331
+ ] }),
5332
+ /* @__PURE__ */ jsxs("div", { children: [
5333
+ /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Menu" }),
5334
+ /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500 mb-3", children: "Controls font size, padding, taskbar height, and window button height across the Start Menu, context menus, dropdowns, and the notification popup." }),
5335
+ /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
5336
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5337
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-24 shrink-0", children: "Size" }),
5338
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [
5339
+ { key: "small", label: "Small" },
5340
+ { key: "medium", label: "Medium" },
5341
+ { key: "large", label: "Large" }
5342
+ ].map((s) => /* @__PURE__ */ jsx(
5343
+ "button",
5344
+ {
5345
+ onClick: () => savePref("start_menu_size", s.key),
5346
+ className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${(prefs.start_menu_size || "medium") === s.key ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5347
+ children: s.label
5348
+ },
5349
+ s.key
5350
+ )) })
5351
+ ] }),
5352
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
5353
+ /* @__PURE__ */ jsx("span", { className: "text-sm text-gray-700 w-24 shrink-0", children: "Density" }),
5354
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2", children: [
5355
+ { key: "tight", label: "Tight" },
5356
+ { key: "normal", label: "Normal" }
5357
+ ].map((s) => /* @__PURE__ */ jsx(
5358
+ "button",
5359
+ {
5360
+ onClick: () => savePref("menu_density", s.key),
5361
+ className: `px-3 py-1.5 text-xs font-medium rounded-lg border transition-colors ${(prefs.menu_density || "normal") === s.key ? "bg-blue-600 text-white border-blue-600" : "bg-white text-gray-700 border-gray-300 hover:bg-gray-50"}`,
5362
+ children: s.label
5363
+ },
5364
+ s.key
5365
+ )) })
5366
+ ] })
5408
5367
  ] })
5409
5368
  ] })
5410
5369
  ] }),
5411
- !omitSet.has("behavior") && /* @__PURE__ */ jsxs("div", { children: [
5370
+ inSection("behavior") && !omitSet.has("behavior") && /* @__PURE__ */ jsxs("div", { children: [
5412
5371
  /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Behavior" }),
5413
5372
  /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
5414
5373
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
@@ -5460,7 +5419,7 @@ function Customization({ omit } = {}) {
5460
5419
  ] })
5461
5420
  ] })
5462
5421
  ] }),
5463
- !omitSet.has("desktop") && /* @__PURE__ */ jsxs("div", { children: [
5422
+ inSection("behavior") && !omitSet.has("desktop") && /* @__PURE__ */ jsxs("div", { children: [
5464
5423
  /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-gray-900 mb-3", children: "Desktop" }),
5465
5424
  /* @__PURE__ */ jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [
5466
5425
  /* @__PURE__ */ jsx(
@@ -6641,6 +6600,6 @@ function useEditHotkey(callback) {
6641
6600
  }, [callback, isActive]);
6642
6601
  }
6643
6602
 
6644
- 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 };
6603
+ 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, TopNav, VERSION, WidgetManager, applyDevTitle, createWindowRegistry, isDevEnv, isMac, openBugReportDialog, reportBug, useBugReport, useClickOutside, useColumnConfig, useDesktopHost, useEditHotkey, useInfiniteScroll, useNewHotkey, useShellEntityFetcher, useSort, useTableNav };
6645
6604
  //# sourceMappingURL=index.js.map
6646
6605
  //# sourceMappingURL=index.js.map