react-os-shell 0.6.1 → 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 CHANGED
@@ -915,7 +915,7 @@ function StatusBadge({ status }) {
915
915
  }
916
916
 
917
917
  // src/version.ts
918
- var VERSION = "0.6.1" ;
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
  {
@@ -4611,7 +4614,7 @@ function Layout({
4611
4614
  "data-menu-toggle": true,
4612
4615
  onClick: () => setMenuOpen((prev) => !prev),
4613
4616
  title: menuOpen ? "Close menu" : "Open menu",
4614
- className: `group/erp relative flex items-center gap-1.5 rounded-lg px-4 py-2 text-xs font-medium border overflow-hidden transition-all ${isVerticalTaskbar ? "w-full" : "min-w-[140px]"} ${menuOpen ? "bg-gray-200/40 border-gray-300/40 text-gray-800" : "bg-gray-50/40 border-gray-200/40 text-gray-600 hover:text-gray-800"}`,
4617
+ className: `group/erp relative flex items-center justify-center gap-1.5 rounded-lg px-4 py-2 text-xs font-medium border overflow-hidden transition-all ${isVerticalTaskbar ? "w-full" : "min-w-[140px]"} ${menuOpen ? "bg-gray-200/40 border-gray-300/40 text-gray-800" : "bg-gray-50/40 border-gray-200/40 text-gray-600 hover:text-gray-800"}`,
4615
4618
  style: { transition: "box-shadow 0.3s, border-color 0.3s" },
4616
4619
  onMouseMove: (e) => {
4617
4620
  const r = e.currentTarget.getBoundingClientRect();