react-os-shell 0.6.2 → 0.6.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.
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -915,7 +915,7 @@ function StatusBadge({ status }) {
|
|
|
915
915
|
}
|
|
916
916
|
|
|
917
917
|
// src/version.ts
|
|
918
|
-
var VERSION = "0.6.
|
|
918
|
+
var VERSION = "0.6.3" ;
|
|
919
919
|
var APP_VERSION = VERSION;
|
|
920
920
|
|
|
921
921
|
// src/changelog.ts
|
|
@@ -3050,11 +3050,13 @@ function StartMenu({
|
|
|
3050
3050
|
const itemCls = `w-full flex items-center gap-2 rounded-lg ${sizeConfig.px} ${sizeConfig.py} ${sizeConfig.text}`;
|
|
3051
3051
|
const flyoutH = flyoutItems.length * sizeConfig.itemH + 12;
|
|
3052
3052
|
const menuWidth = sizeConfig.mw;
|
|
3053
|
+
const menuRect = menuRef.current?.getBoundingClientRect();
|
|
3054
|
+
const minTop = menuRect ? menuRect.top : taskbarPosition === "top" ? taskbarH + 4 : 4;
|
|
3055
|
+
const maxBottom = menuRect ? menuRect.bottom : taskbarPosition === "bottom" ? window.innerHeight - taskbarH - 4 : window.innerHeight - 4;
|
|
3053
3056
|
let flyoutTop = hoveredY - flyoutH / 2;
|
|
3054
|
-
const minTop = taskbarPosition === "top" ? taskbarH + 4 : 4;
|
|
3055
|
-
const maxBottom = taskbarPosition === "bottom" ? window.innerHeight - taskbarH - 4 : window.innerHeight - 4;
|
|
3056
3057
|
if (flyoutTop < minTop) flyoutTop = minTop;
|
|
3057
|
-
if (flyoutTop + flyoutH > maxBottom) flyoutTop = maxBottom - flyoutH;
|
|
3058
|
+
if (flyoutTop + flyoutH > maxBottom) flyoutTop = Math.max(minTop, maxBottom - flyoutH);
|
|
3059
|
+
const flyoutMaxH = maxBottom - flyoutTop;
|
|
3058
3060
|
const handleSectionHover = (label, e) => {
|
|
3059
3061
|
clearTimeout(hoverTimeout.current);
|
|
3060
3062
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
@@ -3262,8 +3264,8 @@ function StartMenu({
|
|
|
3262
3264
|
"div",
|
|
3263
3265
|
{
|
|
3264
3266
|
ref: flyoutRef,
|
|
3265
|
-
className: `fixed ${sizeConfig.fw} rounded-2xl overflow-hidden`,
|
|
3266
|
-
style: { left: menuRef.current ? menuRef.current.getBoundingClientRect().right + 4 : menuWidth + 12, top: flyoutTop, animation: "submenu-in 0.1s ease-out", ...menuGlass },
|
|
3267
|
+
className: `fixed ${sizeConfig.fw} rounded-2xl flex flex-col overflow-hidden`,
|
|
3268
|
+
style: { left: menuRef.current ? menuRef.current.getBoundingClientRect().right + 4 : menuWidth + 12, top: flyoutTop, maxHeight: flyoutMaxH, animation: "submenu-in 0.1s ease-out", ...menuGlass },
|
|
3267
3269
|
onMouseEnter: () => clearTimeout(hoverTimeout.current),
|
|
3268
3270
|
onMouseLeave: () => {
|
|
3269
3271
|
hoverTimeout.current = setTimeout(() => {
|
|
@@ -3271,7 +3273,7 @@ function StartMenu({
|
|
|
3271
3273
|
setHoveredChild(null);
|
|
3272
3274
|
}, 200);
|
|
3273
3275
|
},
|
|
3274
|
-
children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1", children: flyoutItems.map((item) => {
|
|
3276
|
+
children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto", children: flyoutItems.map((item) => {
|
|
3275
3277
|
const hasChildren = !!item.children && item.children.length > 0;
|
|
3276
3278
|
const isChildHovered = hoveredChild === item.to;
|
|
3277
3279
|
return /* @__PURE__ */ jsxs(
|
|
@@ -3316,12 +3318,13 @@ function StartMenu({
|
|
|
3316
3318
|
const subH = kids.length * sizeConfig.itemH + 12;
|
|
3317
3319
|
let subTop = hoveredChildY - subH / 2;
|
|
3318
3320
|
if (subTop < minTop) subTop = minTop;
|
|
3319
|
-
if (subTop + subH > maxBottom) subTop = maxBottom - subH;
|
|
3321
|
+
if (subTop + subH > maxBottom) subTop = Math.max(minTop, maxBottom - subH);
|
|
3322
|
+
const subMaxH = maxBottom - subTop;
|
|
3320
3323
|
return /* @__PURE__ */ jsx(
|
|
3321
3324
|
"div",
|
|
3322
3325
|
{
|
|
3323
|
-
className: `fixed ${sizeConfig.fw} rounded-2xl overflow-hidden`,
|
|
3324
|
-
style: { left: subLeft, top: subTop, animation: "submenu-in 0.1s ease-out", ...menuGlass },
|
|
3326
|
+
className: `fixed ${sizeConfig.fw} rounded-2xl flex flex-col overflow-hidden`,
|
|
3327
|
+
style: { left: subLeft, top: subTop, maxHeight: subMaxH, animation: "submenu-in 0.1s ease-out", ...menuGlass },
|
|
3325
3328
|
onMouseEnter: () => {
|
|
3326
3329
|
clearTimeout(hoverTimeout.current);
|
|
3327
3330
|
clearTimeout(childHoverTimeout.current);
|
|
@@ -3329,7 +3332,7 @@ function StartMenu({
|
|
|
3329
3332
|
onMouseLeave: () => {
|
|
3330
3333
|
childHoverTimeout.current = setTimeout(() => setHoveredChild(null), 200);
|
|
3331
3334
|
},
|
|
3332
|
-
children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1", children: kids.map((child) => /* @__PURE__ */ jsxs("div", { children: [
|
|
3335
|
+
children: /* @__PURE__ */ jsx("div", { className: "py-1 px-1 overflow-y-auto", children: kids.map((child) => /* @__PURE__ */ jsxs("div", { children: [
|
|
3333
3336
|
/* @__PURE__ */ jsxs(
|
|
3334
3337
|
"button",
|
|
3335
3338
|
{
|