react-os-shell 3.8.2 → 3.8.4
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.
- package/dist/{Browser-77PJ64S4.js → Browser-T34WCNYN.js} +4 -4
- package/dist/{Browser-77PJ64S4.js.map → Browser-T34WCNYN.js.map} +1 -1
- package/dist/{Documents-3DPAEIDN.js → Documents-ORXYRD7H.js} +3 -3
- package/dist/{Documents-3DPAEIDN.js.map → Documents-ORXYRD7H.js.map} +1 -1
- package/dist/Files-MFF7AZ35.js +12 -0
- package/dist/{Files-26RIY47R.js.map → Files-MFF7AZ35.js.map} +1 -1
- package/dist/{Notepad-IO4NMABX.js → Notepad-QRBJZMUQ.js} +3 -3
- package/dist/{Notepad-IO4NMABX.js.map → Notepad-QRBJZMUQ.js.map} +1 -1
- package/dist/Preview-S5QCAIXM.js +8 -0
- package/dist/{Preview-HEUOQUPQ.js.map → Preview-S5QCAIXM.js.map} +1 -1
- package/dist/{Spreadsheet-VQ7XHGSJ.js → Spreadsheet-DKGWO74M.js} +4 -4
- package/dist/{Spreadsheet-VQ7XHGSJ.js.map → Spreadsheet-DKGWO74M.js.map} +1 -1
- package/dist/apps/index.js +12 -12
- package/dist/{chunk-YPRZD2X2.js → chunk-4MTVCPZK.js} +3 -3
- package/dist/{chunk-YPRZD2X2.js.map → chunk-4MTVCPZK.js.map} +1 -1
- package/dist/{chunk-OBWFE5P6.js → chunk-4OJAA5EE.js} +4 -4
- package/dist/{chunk-OBWFE5P6.js.map → chunk-4OJAA5EE.js.map} +1 -1
- package/dist/{chunk-THNAEEQG.js → chunk-BOF2PGOL.js} +3 -3
- package/dist/{chunk-THNAEEQG.js.map → chunk-BOF2PGOL.js.map} +1 -1
- package/dist/{chunk-Y2TWETKD.js → chunk-LP4C5UHL.js} +3 -3
- package/dist/{chunk-Y2TWETKD.js.map → chunk-LP4C5UHL.js.map} +1 -1
- package/dist/{chunk-HNLQ7MWH.js → chunk-TG6RCJNY.js} +3 -3
- package/dist/{chunk-HNLQ7MWH.js.map → chunk-TG6RCJNY.js.map} +1 -1
- package/dist/{chunk-EZB2RV6Z.js → chunk-ZJ7WMV57.js} +4 -4
- package/dist/{chunk-EZB2RV6Z.js.map → chunk-ZJ7WMV57.js.map} +1 -1
- package/dist/index.js +235 -227
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/Files-26RIY47R.js +0 -12
- package/dist/Preview-HEUOQUPQ.js +0 -8
package/dist/index.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { subscribePomo, getPomoSnapshot } from './chunk-F2KBTMSP.js';
|
|
2
2
|
export { setShellTodoProvider } from './chunk-F2KBTMSP.js';
|
|
3
|
-
import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-
|
|
4
|
-
export { Breadcrumbs } from './chunk-
|
|
3
|
+
import { PREVIEW_OPENED_EVENT, publishDesktopFolders, requestFilesTrashView, FolderGlyph, openPreviewFile, requestFilesDesktopFolderView, FileIconTile, hashGradient } from './chunk-ZJ7WMV57.js';
|
|
4
|
+
export { Breadcrumbs } from './chunk-ZJ7WMV57.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-
|
|
9
|
-
export { ImageAnnotator_default as ImageAnnotator } from './chunk-
|
|
8
|
+
import { setPdfPreview } from './chunk-LP4C5UHL.js';
|
|
9
|
+
export { ImageAnnotator_default as ImageAnnotator } from './chunk-LP4C5UHL.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-
|
|
13
|
-
export { EditableGrid } from './chunk-
|
|
12
|
+
import { EditableGrid } from './chunk-TG6RCJNY.js';
|
|
13
|
+
export { EditableGrid } from './chunk-TG6RCJNY.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-
|
|
17
|
-
export { VERSION } from './chunk-
|
|
16
|
+
import { APP_VERSION, VERSION } from './chunk-4MTVCPZK.js';
|
|
17
|
+
export { VERSION } from './chunk-4MTVCPZK.js';
|
|
18
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
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';
|
|
@@ -2932,78 +2932,68 @@ function StartMenu({
|
|
|
2932
2932
|
v.label
|
|
2933
2933
|
);
|
|
2934
2934
|
};
|
|
2935
|
-
return
|
|
2936
|
-
/*
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
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
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
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
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
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
|
-
|
|
3036
|
-
] }
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
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:
|
|
3094
|
+
ref: flyoutRef,
|
|
3149
3095
|
className: `fixed ${sizeConfig.fw} rounded-2xl overflow-hidden`,
|
|
3150
|
-
style: { left:
|
|
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
|
-
|
|
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:
|
|
3159
|
-
|
|
3160
|
-
|
|
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
|
-
|
|
3163
|
-
|
|
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
|
-
|
|
3166
|
-
|
|
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
|
-
|
|
3171
|
-
|
|
3133
|
+
},
|
|
3134
|
+
item.to
|
|
3135
|
+
);
|
|
3136
|
+
}) })
|
|
3172
3137
|
}
|
|
3173
|
-
)
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
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
|
|
@@ -5343,8 +5351,8 @@ function useTableNav(items, onSelect, onToggle, onSelectAll, onSelectRange) {
|
|
|
5343
5351
|
setFocusIdx(idx);
|
|
5344
5352
|
}
|
|
5345
5353
|
};
|
|
5346
|
-
document.addEventListener("click", handler);
|
|
5347
|
-
return () => document.removeEventListener("click", handler);
|
|
5354
|
+
document.addEventListener("click", handler, true);
|
|
5355
|
+
return () => document.removeEventListener("click", handler, true);
|
|
5348
5356
|
}, []);
|
|
5349
5357
|
useEffect(() => {
|
|
5350
5358
|
const handler = (e) => {
|