react-os-shell 3.8.1 → 3.8.3

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 (50) hide show
  1. package/dist/Browser-OFAWCWA7.js +7 -0
  2. package/dist/{Browser-HHXXLQY5.js.map → Browser-OFAWCWA7.js.map} +1 -1
  3. package/dist/{Calculator-5PABMVXY.js → Calculator-5E7C5YLX.js} +4 -4
  4. package/dist/{Calculator-5PABMVXY.js.map → Calculator-5E7C5YLX.js.map} +1 -1
  5. package/dist/{CurrencyConverter-2DTZV4JC.js → CurrencyConverter-27Q7CDIJ.js} +4 -4
  6. package/dist/{CurrencyConverter-2DTZV4JC.js.map → CurrencyConverter-27Q7CDIJ.js.map} +1 -1
  7. package/dist/{Documents-F4JFZGWX.js → Documents-4LBBVF6R.js} +4 -4
  8. package/dist/{Documents-F4JFZGWX.js.map → Documents-4LBBVF6R.js.map} +1 -1
  9. package/dist/Files-K7YYLFER.js +12 -0
  10. package/dist/{Files-DMXTCFVX.js.map → Files-K7YYLFER.js.map} +1 -1
  11. package/dist/{Notepad-AVAB4BFS.js → Notepad-VEBKUHQE.js} +4 -4
  12. package/dist/{Notepad-AVAB4BFS.js.map → Notepad-VEBKUHQE.js.map} +1 -1
  13. package/dist/{PomodoroTimer-PFZVSP3I.js → PomodoroTimer-2FXTKPCH.js} +5 -5
  14. package/dist/{PomodoroTimer-PFZVSP3I.js.map → PomodoroTimer-2FXTKPCH.js.map} +1 -1
  15. package/dist/Preview-K2QPBTWW.js +8 -0
  16. package/dist/{Preview-IDRIJCBV.js.map → Preview-K2QPBTWW.js.map} +1 -1
  17. package/dist/Spreadsheet-CMNESS2Z.js +7 -0
  18. package/dist/{Spreadsheet-YKUVS5XW.js.map → Spreadsheet-CMNESS2Z.js.map} +1 -1
  19. package/dist/{Stock-OMLDYMWN.js → Stock-YZFDBHRV.js} +4 -4
  20. package/dist/{Stock-OMLDYMWN.js.map → Stock-YZFDBHRV.js.map} +1 -1
  21. package/dist/{Weather-7QUTCZKH.js → Weather-ECNKTQWZ.js} +4 -4
  22. package/dist/{Weather-7QUTCZKH.js.map → Weather-ECNKTQWZ.js.map} +1 -1
  23. package/dist/{WorldClock-M6IVJBYN.js → WorldClock-WRIK5RPI.js} +4 -4
  24. package/dist/{WorldClock-M6IVJBYN.js.map → WorldClock-WRIK5RPI.js.map} +1 -1
  25. package/dist/apps/index.js +19 -19
  26. package/dist/{chunk-WPZDC7HH.js → chunk-3BN3QZX5.js} +3 -3
  27. package/dist/{chunk-WPZDC7HH.js.map → chunk-3BN3QZX5.js.map} +1 -1
  28. package/dist/{chunk-WKWPQJU6.js → chunk-76Y7ARZ6.js} +4 -4
  29. package/dist/{chunk-WKWPQJU6.js.map → chunk-76Y7ARZ6.js.map} +1 -1
  30. package/dist/{chunk-L7B66ALK.js → chunk-F2KBTMSP.js} +3 -3
  31. package/dist/{chunk-L7B66ALK.js.map → chunk-F2KBTMSP.js.map} +1 -1
  32. package/dist/{chunk-R2GLJUIY.js → chunk-G6GRIOEQ.js} +4 -4
  33. package/dist/{chunk-R2GLJUIY.js.map → chunk-G6GRIOEQ.js.map} +1 -1
  34. package/dist/{chunk-S2J7QSP6.js → chunk-GRO7CFKE.js} +4 -4
  35. package/dist/{chunk-S2J7QSP6.js.map → chunk-GRO7CFKE.js.map} +1 -1
  36. package/dist/{chunk-S22GZ4OQ.js → chunk-HJ5ZNXPB.js} +3 -3
  37. package/dist/{chunk-S22GZ4OQ.js.map → chunk-HJ5ZNXPB.js.map} +1 -1
  38. package/dist/{chunk-BWPJMJR4.js → chunk-JC4DRXZT.js} +5 -5
  39. package/dist/{chunk-BWPJMJR4.js.map → chunk-JC4DRXZT.js.map} +1 -1
  40. package/dist/{chunk-JSV6S5OL.js → chunk-N4LKUQFC.js} +4 -4
  41. package/dist/{chunk-JSV6S5OL.js.map → chunk-N4LKUQFC.js.map} +1 -1
  42. package/dist/{chunk-J63SUCG5.js → chunk-Z6OFNDHV.js} +4 -4
  43. package/dist/{chunk-J63SUCG5.js.map → chunk-Z6OFNDHV.js.map} +1 -1
  44. package/dist/index.js +237 -229
  45. package/dist/index.js.map +1 -1
  46. package/package.json +1 -1
  47. package/dist/Browser-HHXXLQY5.js +0 -7
  48. package/dist/Files-DMXTCFVX.js +0 -12
  49. package/dist/Preview-IDRIJCBV.js +0 -8
  50. package/dist/Spreadsheet-YKUVS5XW.js +0 -7
package/dist/index.js CHANGED
@@ -1,22 +1,22 @@
1
- import { subscribePomo, getPomoSnapshot } from './chunk-L7B66ALK.js';
2
- export { setShellTodoProvider } from './chunk-L7B66ALK.js';
3
- import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-J63SUCG5.js';
4
- export { Breadcrumbs } from './chunk-J63SUCG5.js';
1
+ import { subscribePomo, getPomoSnapshot } from './chunk-F2KBTMSP.js';
2
+ export { setShellTodoProvider } from './chunk-F2KBTMSP.js';
3
+ import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-Z6OFNDHV.js';
4
+ export { Breadcrumbs } from './chunk-Z6OFNDHV.js';
5
5
  import { SidebarLayout } from './chunk-VGTEM5RZ.js';
6
6
  export { SidebarLayout } from './chunk-VGTEM5RZ.js';
7
7
  import { playNotification, playStartup, soundsEnabled, getSoundConfig, SOUND_PACK_KEYS, SOUND_PACKS, SOUND_TYPES, SOUND_TYPE_LABELS, setSoundForType, previewSound, setAllSounds, playLogout } from './chunk-D7PYW2QS.js';
8
- import { setPdfPreview } from './chunk-WKWPQJU6.js';
9
- export { ImageAnnotator_default as ImageAnnotator } from './chunk-WKWPQJU6.js';
8
+ import { setPdfPreview } from './chunk-76Y7ARZ6.js';
9
+ export { ImageAnnotator_default as ImageAnnotator } from './chunk-76Y7ARZ6.js';
10
10
  import { toast_default } from './chunk-VENYVK3L.js';
11
11
  export { toast_default as toast } from './chunk-VENYVK3L.js';
12
- import { EditableGrid } from './chunk-R2GLJUIY.js';
13
- export { EditableGrid } from './chunk-R2GLJUIY.js';
12
+ import { EditableGrid } from './chunk-G6GRIOEQ.js';
13
+ export { EditableGrid } from './chunk-G6GRIOEQ.js';
14
14
  import { useAuth, useShellAuth } from './chunk-ADJ3CERD.js';
15
15
  export { ShellAuthProvider, setShellAuthBridge, useShellAuth } from './chunk-ADJ3CERD.js';
16
- import { APP_VERSION, VERSION } from './chunk-JSV6S5OL.js';
17
- export { VERSION } from './chunk-JSV6S5OL.js';
18
- import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, WINDOW_REGISTRY, isPageEntry, Modal, useShellPrefs, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, CancelButton, setWindowPosition, ThumbCard, activateModal } from './chunk-S22GZ4OQ.js';
19
- export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-S22GZ4OQ.js';
16
+ import { APP_VERSION, VERSION } from './chunk-N4LKUQFC.js';
17
+ export { VERSION } from './chunk-N4LKUQFC.js';
18
+ import { useWindowManager, PopupMenu, PopupMenuLabel, PopupMenuDivider, PopupMenuItem, WINDOW_REGISTRY, isPageEntry, Modal, useShellPrefs, useIsMobile, ModalActions, useModalActive, client_default, LoadingSpinner, CancelButton, setWindowPosition, ThumbCard, activateModal } from './chunk-HJ5ZNXPB.js';
19
+ export { CancelButton, CopyButton, DocFavStar, Modal, ModalActions, PopupMenu, PopupMenuDivider, PopupMenuItem, PopupMenuLabel, ShellPrefsProvider, WindowCrashedFallback, WindowErrorBoundary, WindowManagerProvider, WindowTitle, commitExposeHighlight, exitExposeMode, getActiveWindowRoute, getExposeHighlight, getWindowPosition, isEntityEntry, isPageEntry, registerModalEscapeInterceptor, setExposeHighlight, setShellApiClient, setShellWindowRegistry, setWindowDefaultPosition, setWindowPosition, subscribeExposeHighlight, toggleExposeMode, useLocalStoragePrefs, useModalActive, useShellPrefs, useWidgetSettings, useWindowManager, useWindowMenuItem, useWindowTitle } from './chunk-HJ5ZNXPB.js';
20
20
  export { ConfirmProvider, confirm, confirmDestructive, prompt } from './chunk-UBN4IUDE.js';
21
21
  import { glassStyle, startMenuCategories, navSections, isSection, GLASS_INPUT_BG, navIcons, sectionIcons } from './chunk-ZF6AYO4G.js';
22
22
  export { GLASS_DIVIDER, GLASS_INPUT_BG, glassStyle, setShellNavIcons } from './chunk-ZF6AYO4G.js';
@@ -2932,78 +2932,68 @@ function StartMenu({
2932
2932
  v.label
2933
2933
  );
2934
2934
  };
2935
- return /* @__PURE__ */ jsxs("div", { ref: menuRef, className: "fixed z-[260]", style: posStyle, children: [
2936
- /* @__PURE__ */ jsxs("div", { className: "flex", children: [
2937
- /* @__PURE__ */ jsxs(
2938
- "div",
2939
- {
2940
- className: `${sizeConfig.w} rounded-2xl flex ${isVertical ? "flex-col-reverse" : "flex-col"} overflow-hidden`,
2941
- style: { animation: "menu-in 0.15s ease-out", ...menuGlass },
2942
- children: [
2943
- /* @__PURE__ */ jsx("div", { className: `px-3 ${isVertical ? "pb-3 pt-2 border-t border-white/20" : "pt-3 pb-2"}`, children: /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-2 ${GLASS_INPUT_BG} rounded-lg px-2.5 py-1.5`, children: [
2944
- /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5 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: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" }) }),
2945
- /* @__PURE__ */ jsx(
2946
- "input",
2947
- {
2948
- value: search,
2949
- onChange: (e) => {
2950
- setSearch(e.target.value);
2951
- setHoveredSection(null);
2952
- setSearchIdx(0);
2953
- },
2954
- onKeyDown: (e) => {
2955
- if (search.length >= 2 && searchResults.length > 0) {
2956
- if (e.key === "ArrowDown") {
2957
- e.preventDefault();
2958
- setSearchIdx((i) => Math.min(i + 1, searchResults.length - 1));
2959
- } else if (e.key === "ArrowUp") {
2960
- e.preventDefault();
2961
- setSearchIdx((i) => Math.max(i - 1, 0));
2962
- } else if (e.key === "Enter") {
2963
- e.preventDefault();
2964
- handleClick(searchResults[searchIdx].to);
2965
- }
2966
- }
2967
- },
2968
- placeholder: "Search...",
2969
- className: "flex-1 bg-transparent text-xs outline-none placeholder-gray-400",
2970
- autoFocus: true
2971
- }
2972
- )
2973
- ] }) }),
2974
- search.length >= 2 ? /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto px-1 pb-2 max-h-[400px]", children: searchResults.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400 text-center py-4", children: "No results" }) : searchResults.map((r, i) => /* @__PURE__ */ jsxs(
2975
- "button",
2976
- {
2977
- onClick: () => handleClick(r.to),
2978
- onMouseEnter: () => setSearchIdx(i),
2979
- className: `${itemCls} transition-colors ${i === searchIdx ? "bg-blue-50 text-blue-700" : "text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,
2980
- children: [
2981
- iconEl(r.to),
2982
- /* @__PURE__ */ jsx("span", { children: r.label }),
2983
- r.section && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400 ml-auto", children: r.section })
2984
- ]
2985
- },
2986
- i
2987
- )) }) : /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-1 pb-1 flex flex-col", children: [
2988
- isVertical && /* @__PURE__ */ jsxs(Fragment, { children: [
2989
- footerItems.map((item) => /* @__PURE__ */ jsxs(
2990
- "button",
2935
+ return (
2936
+ /* z-[1100]: sit above the entire window stack — normal windows climb to
2937
+ 50 + idx*10 + 1 and pinned-on-top windows render at 999 (see Modal.tsx),
2938
+ which previously painted over the open Start menu (BG#00259). 1100 clears
2939
+ both. Deliberately kept BELOW Exposé / mission-control (zIndex 2000–9999
2940
+ in Modal.tsx) and the transient full-screen overlay tier (toasts,
2941
+ startup, logout z-[9999]), which should still cover the menu. */
2942
+ /* @__PURE__ */ jsxs("div", { ref: menuRef, className: "fixed z-[1100]", style: posStyle, children: [
2943
+ /* @__PURE__ */ jsxs("div", { className: "flex", children: [
2944
+ /* @__PURE__ */ jsxs(
2945
+ "div",
2946
+ {
2947
+ className: `${sizeConfig.w} rounded-2xl flex ${isVertical ? "flex-col-reverse" : "flex-col"} overflow-hidden`,
2948
+ style: { animation: "menu-in 0.15s ease-out", ...menuGlass },
2949
+ children: [
2950
+ /* @__PURE__ */ jsx("div", { className: `px-3 ${isVertical ? "pb-3 pt-2 border-t border-white/20" : "pt-3 pb-2"}`, children: /* @__PURE__ */ jsxs("div", { className: `flex items-center gap-2 ${GLASS_INPUT_BG} rounded-lg px-2.5 py-1.5`, children: [
2951
+ /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5 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: "M21 21l-5.197-5.197m0 0A7.5 7.5 0 105.196 5.196a7.5 7.5 0 0010.607 10.607z" }) }),
2952
+ /* @__PURE__ */ jsx(
2953
+ "input",
2991
2954
  {
2992
- onClick: () => handleClick(item.to),
2993
- className: `${itemCls} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,
2994
- children: [
2995
- iconEl(item.to),
2996
- /* @__PURE__ */ jsx("span", { children: item.label })
2997
- ]
2998
- },
2999
- item.to
3000
- )),
3001
- footerSections.map((s) => renderSection(s, false)),
3002
- (footerSections.length > 0 || footerItems.length > 0) && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3003
- erpSections.map((s) => renderSection(s, true)),
3004
- erpSections.length > 0 && hasAppsGroup && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3005
- topItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
3006
- /* @__PURE__ */ jsxs(
2955
+ value: search,
2956
+ onChange: (e) => {
2957
+ setSearch(e.target.value);
2958
+ setHoveredSection(null);
2959
+ setSearchIdx(0);
2960
+ },
2961
+ onKeyDown: (e) => {
2962
+ if (search.length >= 2 && searchResults.length > 0) {
2963
+ if (e.key === "ArrowDown") {
2964
+ e.preventDefault();
2965
+ setSearchIdx((i) => Math.min(i + 1, searchResults.length - 1));
2966
+ } else if (e.key === "ArrowUp") {
2967
+ e.preventDefault();
2968
+ setSearchIdx((i) => Math.max(i - 1, 0));
2969
+ } else if (e.key === "Enter") {
2970
+ e.preventDefault();
2971
+ handleClick(searchResults[searchIdx].to);
2972
+ }
2973
+ }
2974
+ },
2975
+ placeholder: "Search...",
2976
+ className: "flex-1 bg-transparent text-xs outline-none placeholder-gray-400",
2977
+ autoFocus: true
2978
+ }
2979
+ )
2980
+ ] }) }),
2981
+ search.length >= 2 ? /* @__PURE__ */ jsx("div", { className: "flex-1 overflow-y-auto px-1 pb-2 max-h-[400px]", children: searchResults.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-400 text-center py-4", children: "No results" }) : searchResults.map((r, i) => /* @__PURE__ */ jsxs(
2982
+ "button",
2983
+ {
2984
+ onClick: () => handleClick(r.to),
2985
+ onMouseEnter: () => setSearchIdx(i),
2986
+ className: `${itemCls} transition-colors ${i === searchIdx ? "bg-blue-50 text-blue-700" : "text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,
2987
+ children: [
2988
+ iconEl(r.to),
2989
+ /* @__PURE__ */ jsx("span", { children: r.label }),
2990
+ r.section && /* @__PURE__ */ jsx("span", { className: "text-[10px] text-gray-400 ml-auto", children: r.section })
2991
+ ]
2992
+ },
2993
+ i
2994
+ )) }) : /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-1 pb-1 flex flex-col", children: [
2995
+ isVertical && /* @__PURE__ */ jsxs(Fragment, { children: [
2996
+ footerItems.map((item) => /* @__PURE__ */ jsxs(
3007
2997
  "button",
3008
2998
  {
3009
2999
  onClick: () => handleClick(item.to),
@@ -3012,16 +3002,52 @@ function StartMenu({
3012
3002
  iconEl(item.to),
3013
3003
  /* @__PURE__ */ jsx("span", { children: item.label })
3014
3004
  ]
3015
- }
3016
- ),
3017
- item.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3018
- ] }, item.to)),
3019
- systemSections.map((s) => renderSection(s, false)),
3020
- virtualSections.map((v) => renderVirtualSection(v))
3021
- ] }),
3022
- !isVertical && /* @__PURE__ */ jsxs(Fragment, { children: [
3023
- topItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
3024
- /* @__PURE__ */ jsxs(
3005
+ },
3006
+ item.to
3007
+ )),
3008
+ footerSections.map((s) => renderSection(s, false)),
3009
+ (footerSections.length > 0 || footerItems.length > 0) && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3010
+ erpSections.map((s) => renderSection(s, true)),
3011
+ erpSections.length > 0 && hasAppsGroup && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3012
+ topItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
3013
+ /* @__PURE__ */ jsxs(
3014
+ "button",
3015
+ {
3016
+ onClick: () => handleClick(item.to),
3017
+ className: `${itemCls} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,
3018
+ children: [
3019
+ iconEl(item.to),
3020
+ /* @__PURE__ */ jsx("span", { children: item.label })
3021
+ ]
3022
+ }
3023
+ ),
3024
+ item.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3025
+ ] }, item.to)),
3026
+ systemSections.map((s) => renderSection(s, false)),
3027
+ virtualSections.map((v) => renderVirtualSection(v))
3028
+ ] }),
3029
+ !isVertical && /* @__PURE__ */ jsxs(Fragment, { children: [
3030
+ topItems.map((item) => /* @__PURE__ */ jsxs("div", { children: [
3031
+ /* @__PURE__ */ jsxs(
3032
+ "button",
3033
+ {
3034
+ onClick: () => handleClick(item.to),
3035
+ className: `${itemCls} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,
3036
+ children: [
3037
+ iconEl(item.to),
3038
+ /* @__PURE__ */ jsx("span", { children: item.label })
3039
+ ]
3040
+ }
3041
+ ),
3042
+ item.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3043
+ ] }, item.to)),
3044
+ systemSections.map((s) => renderSection(s, false)),
3045
+ virtualSections.map((v) => renderVirtualSection(v)),
3046
+ hasAppsGroup && erpSections.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3047
+ erpSections.map((s) => renderSection(s, true)),
3048
+ (footerSections.length > 0 || footerItems.length > 0) && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3049
+ footerSections.map((s) => renderSection(s, false)),
3050
+ footerItems.map((item) => /* @__PURE__ */ jsxs(
3025
3051
  "button",
3026
3052
  {
3027
3053
  onClick: () => handleClick(item.to),
@@ -3030,154 +3056,136 @@ function StartMenu({
3030
3056
  iconEl(item.to),
3031
3057
  /* @__PURE__ */ jsx("span", { children: item.label })
3032
3058
  ]
3033
- }
3034
- ),
3035
- item.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3036
- ] }, item.to)),
3037
- systemSections.map((s) => renderSection(s, false)),
3038
- virtualSections.map((v) => renderVirtualSection(v)),
3039
- hasAppsGroup && erpSections.length > 0 && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3040
- erpSections.map((s) => renderSection(s, true)),
3041
- (footerSections.length > 0 || footerItems.length > 0) && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" }),
3042
- footerSections.map((s) => renderSection(s, false)),
3043
- footerItems.map((item) => /* @__PURE__ */ jsxs(
3044
- "button",
3045
- {
3046
- onClick: () => handleClick(item.to),
3047
- className: `${itemCls} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,
3048
- children: [
3049
- iconEl(item.to),
3050
- /* @__PURE__ */ jsx("span", { children: item.label })
3051
- ]
3052
- },
3053
- item.to
3054
- ))
3055
- ] })
3056
- ] }),
3057
- /* @__PURE__ */ jsx("div", { className: `${isVertical ? "border-b" : "border-t"} border-white/20 p-1`, children: /* @__PURE__ */ jsxs(
3058
- "div",
3059
- {
3060
- onClick: () => handleClick("/profile"),
3061
- className: "rounded-lg px-2 py-1.5 flex items-center gap-2.5 hover:bg-blue-50 hover:text-blue-700 transition-colors cursor-pointer",
3062
- children: [
3063
- profile?.avatar_url ? /* @__PURE__ */ jsx("img", { src: profile.avatar_url, alt: "", className: "h-8 w-8 rounded-full object-cover border border-white/20 shrink-0" }) : /* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center text-sm font-bold text-blue-700 shrink-0", children: (profile?.first_name?.charAt(0) || user?.email?.charAt(0) || "?").toUpperCase() }),
3064
- /* @__PURE__ */ jsx("p", { className: "flex-1 min-w-0 text-sm font-medium text-gray-900 truncate", children: profile?.first_name ? `${profile.first_name} ${profile.last_name || ""}`.trim() : user?.email }),
3065
- /* @__PURE__ */ jsx(
3066
- "button",
3067
- {
3068
- onClick: (e) => {
3069
- e.stopPropagation();
3070
- onClose();
3071
- onLogout();
3072
- },
3073
- title: "Sign Out",
3074
- className: "shrink-0 p-1.5 rounded-md text-gray-500 hover:text-red-600 hover:bg-red-50 transition-colors",
3075
- children: /* @__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: "M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9" }) })
3076
- }
3077
- )
3078
- ]
3079
- }
3080
- ) })
3081
- ]
3082
- }
3083
- ),
3084
- hoveredSection && flyoutItems.length > 0 && search.length < 2 && /* @__PURE__ */ jsx(
3085
- "div",
3086
- {
3087
- ref: flyoutRef,
3088
- className: `fixed ${sizeConfig.fw} rounded-2xl overflow-hidden`,
3089
- style: { left: menuRef.current ? menuRef.current.getBoundingClientRect().right + 4 : menuWidth + 12, top: flyoutTop, animation: "submenu-in 0.1s ease-out", ...menuGlass },
3090
- onMouseEnter: () => clearTimeout(hoverTimeout.current),
3091
- onMouseLeave: () => {
3092
- hoverTimeout.current = setTimeout(() => {
3093
- setHoveredSection(null);
3094
- setHoveredChild(null);
3095
- }, 200);
3096
- },
3097
- children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto overscroll-contain", style: { maxHeight: availH }, children: flyoutItems.map((item) => {
3098
- const hasChildren = !!item.children && item.children.length > 0;
3099
- const isChildHovered = hoveredChild === item.to;
3100
- return /* @__PURE__ */ jsxs(
3101
- "div",
3102
- {
3103
- onMouseEnter: hasChildren ? (e) => {
3104
- clearTimeout(childHoverTimeout.current);
3105
- const rect = e.currentTarget.getBoundingClientRect();
3106
- setHoveredChildY(rect.top + rect.height / 2);
3107
- setHoveredChild(item.to);
3108
- } : () => {
3109
- childHoverTimeout.current = setTimeout(() => setHoveredChild(null), 200);
3110
- },
3111
- children: [
3112
- /* @__PURE__ */ jsxs(
3113
- "button",
3114
- {
3115
- onClick: () => handleClick(item.to),
3116
- className: `${itemCls} transition-colors ${isChildHovered ? "bg-blue-50 text-blue-700" : "text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,
3117
- children: [
3118
- iconEl(item.to),
3119
- /* @__PURE__ */ jsx("span", { children: item.label }),
3120
- hasChildren && /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5 ml-auto text-gray-500", 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" }) })
3121
- ]
3122
- }
3123
- ),
3124
- item.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3125
- ]
3126
- },
3127
- item.to
3128
- );
3129
- }) })
3130
- }
3131
- ),
3132
- (() => {
3133
- if (search.length >= 2 || !hoveredChild) return null;
3134
- const parent = flyoutItems.find((it) => it.to === hoveredChild);
3135
- const kids = (parent?.children ?? []).filter((c) => !c.perms || hasAnyPerm(c.perms));
3136
- if (!parent || kids.length === 0) return null;
3137
- const flyoutRect = flyoutRef.current?.getBoundingClientRect();
3138
- const subLeft = flyoutRect ? flyoutRect.right + 4 : 0;
3139
- const subEstH = kids.length * sizeConfig.itemH + 12;
3140
- const subH = measuredSub?.key === hoveredChild ? measuredSub.h : subEstH;
3141
- const subBoxH = Math.min(subH, availH);
3142
- let subTop = hoveredChildY - subBoxH / 2;
3143
- if (subTop < minTop) subTop = minTop;
3144
- if (subTop + subBoxH > maxBottom) subTop = Math.max(minTop, maxBottom - subBoxH);
3145
- return /* @__PURE__ */ jsx(
3059
+ },
3060
+ item.to
3061
+ ))
3062
+ ] })
3063
+ ] }),
3064
+ /* @__PURE__ */ jsx("div", { className: `${isVertical ? "border-b" : "border-t"} border-white/20 p-1`, children: /* @__PURE__ */ jsxs(
3065
+ "div",
3066
+ {
3067
+ onClick: () => handleClick("/profile"),
3068
+ className: "rounded-lg px-2 py-1.5 flex items-center gap-2.5 hover:bg-blue-50 hover:text-blue-700 transition-colors cursor-pointer",
3069
+ children: [
3070
+ profile?.avatar_url ? /* @__PURE__ */ jsx("img", { src: profile.avatar_url, alt: "", className: "h-8 w-8 rounded-full object-cover border border-white/20 shrink-0" }) : /* @__PURE__ */ jsx("div", { className: "h-8 w-8 rounded-full bg-blue-100 flex items-center justify-center text-sm font-bold text-blue-700 shrink-0", children: (profile?.first_name?.charAt(0) || user?.email?.charAt(0) || "?").toUpperCase() }),
3071
+ /* @__PURE__ */ jsx("p", { className: "flex-1 min-w-0 text-sm font-medium text-gray-900 truncate", children: profile?.first_name ? `${profile.first_name} ${profile.last_name || ""}`.trim() : user?.email }),
3072
+ /* @__PURE__ */ jsx(
3073
+ "button",
3074
+ {
3075
+ onClick: (e) => {
3076
+ e.stopPropagation();
3077
+ onClose();
3078
+ onLogout();
3079
+ },
3080
+ title: "Sign Out",
3081
+ className: "shrink-0 p-1.5 rounded-md text-gray-500 hover:text-red-600 hover:bg-red-50 transition-colors",
3082
+ children: /* @__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: "M15.75 9V5.25A2.25 2.25 0 0013.5 3h-6a2.25 2.25 0 00-2.25 2.25v13.5A2.25 2.25 0 007.5 21h6a2.25 2.25 0 002.25-2.25V15m3 0l3-3m0 0l-3-3m3 3H9" }) })
3083
+ }
3084
+ )
3085
+ ]
3086
+ }
3087
+ ) })
3088
+ ]
3089
+ }
3090
+ ),
3091
+ hoveredSection && flyoutItems.length > 0 && search.length < 2 && /* @__PURE__ */ jsx(
3146
3092
  "div",
3147
3093
  {
3148
- ref: subFlyoutRef,
3094
+ ref: flyoutRef,
3149
3095
  className: `fixed ${sizeConfig.fw} rounded-2xl overflow-hidden`,
3150
- style: { left: subLeft, top: subTop, animation: "submenu-in 0.1s ease-out", ...menuGlass },
3151
- onMouseEnter: () => {
3152
- clearTimeout(hoverTimeout.current);
3153
- clearTimeout(childHoverTimeout.current);
3154
- },
3096
+ style: { left: menuRef.current ? menuRef.current.getBoundingClientRect().right + 4 : menuWidth + 12, top: flyoutTop, animation: "submenu-in 0.1s ease-out", ...menuGlass },
3097
+ onMouseEnter: () => clearTimeout(hoverTimeout.current),
3155
3098
  onMouseLeave: () => {
3156
- childHoverTimeout.current = setTimeout(() => setHoveredChild(null), 200);
3099
+ hoverTimeout.current = setTimeout(() => {
3100
+ setHoveredSection(null);
3101
+ setHoveredChild(null);
3102
+ }, 200);
3157
3103
  },
3158
- children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto overscroll-contain", style: { maxHeight: availH }, children: kids.map((child) => /* @__PURE__ */ jsxs("div", { children: [
3159
- /* @__PURE__ */ jsxs(
3160
- "button",
3104
+ children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto overscroll-contain", style: { maxHeight: availH }, children: flyoutItems.map((item) => {
3105
+ const hasChildren = !!item.children && item.children.length > 0;
3106
+ const isChildHovered = hoveredChild === item.to;
3107
+ return /* @__PURE__ */ jsxs(
3108
+ "div",
3161
3109
  {
3162
- onClick: () => handleClick(child.to),
3163
- className: `${itemCls} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,
3110
+ onMouseEnter: hasChildren ? (e) => {
3111
+ clearTimeout(childHoverTimeout.current);
3112
+ const rect = e.currentTarget.getBoundingClientRect();
3113
+ setHoveredChildY(rect.top + rect.height / 2);
3114
+ setHoveredChild(item.to);
3115
+ } : () => {
3116
+ childHoverTimeout.current = setTimeout(() => setHoveredChild(null), 200);
3117
+ },
3164
3118
  children: [
3165
- iconEl(child.to),
3166
- /* @__PURE__ */ jsx("span", { children: child.label })
3119
+ /* @__PURE__ */ jsxs(
3120
+ "button",
3121
+ {
3122
+ onClick: () => handleClick(item.to),
3123
+ className: `${itemCls} transition-colors ${isChildHovered ? "bg-blue-50 text-blue-700" : "text-gray-700 hover:bg-blue-50 hover:text-blue-700"}`,
3124
+ children: [
3125
+ iconEl(item.to),
3126
+ /* @__PURE__ */ jsx("span", { children: item.label }),
3127
+ hasChildren && /* @__PURE__ */ jsx("svg", { className: "h-3.5 w-3.5 ml-auto text-gray-500", 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" }) })
3128
+ ]
3129
+ }
3130
+ ),
3131
+ item.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3167
3132
  ]
3168
- }
3169
- ),
3170
- child.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3171
- ] }, child.to)) })
3133
+ },
3134
+ item.to
3135
+ );
3136
+ }) })
3172
3137
  }
3173
- );
3174
- })()
3175
- ] }),
3176
- /* @__PURE__ */ jsx("style", { children: `
3138
+ ),
3139
+ (() => {
3140
+ if (search.length >= 2 || !hoveredChild) return null;
3141
+ const parent = flyoutItems.find((it) => it.to === hoveredChild);
3142
+ const kids = (parent?.children ?? []).filter((c) => !c.perms || hasAnyPerm(c.perms));
3143
+ if (!parent || kids.length === 0) return null;
3144
+ const flyoutRect = flyoutRef.current?.getBoundingClientRect();
3145
+ const subLeft = flyoutRect ? flyoutRect.right + 4 : 0;
3146
+ const subEstH = kids.length * sizeConfig.itemH + 12;
3147
+ const subH = measuredSub?.key === hoveredChild ? measuredSub.h : subEstH;
3148
+ const subBoxH = Math.min(subH, availH);
3149
+ let subTop = hoveredChildY - subBoxH / 2;
3150
+ if (subTop < minTop) subTop = minTop;
3151
+ if (subTop + subBoxH > maxBottom) subTop = Math.max(minTop, maxBottom - subBoxH);
3152
+ return /* @__PURE__ */ jsx(
3153
+ "div",
3154
+ {
3155
+ ref: subFlyoutRef,
3156
+ className: `fixed ${sizeConfig.fw} rounded-2xl overflow-hidden`,
3157
+ style: { left: subLeft, top: subTop, animation: "submenu-in 0.1s ease-out", ...menuGlass },
3158
+ onMouseEnter: () => {
3159
+ clearTimeout(hoverTimeout.current);
3160
+ clearTimeout(childHoverTimeout.current);
3161
+ },
3162
+ onMouseLeave: () => {
3163
+ childHoverTimeout.current = setTimeout(() => setHoveredChild(null), 200);
3164
+ },
3165
+ children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto overscroll-contain", style: { maxHeight: availH }, children: kids.map((child) => /* @__PURE__ */ jsxs("div", { children: [
3166
+ /* @__PURE__ */ jsxs(
3167
+ "button",
3168
+ {
3169
+ onClick: () => handleClick(child.to),
3170
+ className: `${itemCls} text-gray-700 hover:bg-blue-50 hover:text-blue-700 transition-colors`,
3171
+ children: [
3172
+ iconEl(child.to),
3173
+ /* @__PURE__ */ jsx("span", { children: child.label })
3174
+ ]
3175
+ }
3176
+ ),
3177
+ child.dividerAfter && /* @__PURE__ */ jsx("div", { className: "border-t border-white/20 my-1.5 mx-2" })
3178
+ ] }, child.to)) })
3179
+ }
3180
+ );
3181
+ })()
3182
+ ] }),
3183
+ /* @__PURE__ */ jsx("style", { children: `
3177
3184
  @keyframes menu-in { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
3178
3185
  @keyframes submenu-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: translateX(0); } }
3179
3186
  ` })
3180
- ] });
3187
+ ] })
3188
+ );
3181
3189
  }
3182
3190
 
3183
3191
  // src/shell/mobileShellStore.ts