@logickernel/bridge 0.11.3 → 0.11.5

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.
@@ -728,6 +728,14 @@ function getIconComponent(icon) {
728
728
  function NavMain({ items }) {
729
729
  const pathname = usePathname();
730
730
  const { isMobile, setOpenMobile } = useSidebar();
731
+ const isCrossAppPath = (url) => {
732
+ return url.startsWith("/core") || url.startsWith("/aura");
733
+ };
734
+ const handleClick = () => {
735
+ if (isMobile) {
736
+ setOpenMobile(false);
737
+ }
738
+ };
731
739
  if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
732
740
  console.log("[NavMain] Received items:", {
733
741
  itemsCount: items.length,
@@ -827,44 +835,41 @@ function NavMain({ items }) {
827
835
  ]
828
836
  }
829
837
  ) }),
830
- /* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx(SidebarMenuSub, { children: item.items?.map((subItem) => /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsx(
831
- Link,
832
- {
833
- href: subItem.url,
834
- onClick: () => {
835
- if (isMobile) {
836
- setOpenMobile(false);
837
- }
838
- },
839
- children: /* @__PURE__ */ jsx("span", { children: subItem.title })
838
+ /* @__PURE__ */ jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsx(SidebarMenuSub, { children: item.items?.map((subItem) => {
839
+ if (isCrossAppPath(subItem.url)) {
840
+ return /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsx("a", { href: subItem.url, onClick: handleClick, children: /* @__PURE__ */ jsx("span", { children: subItem.title }) }) }) }, subItem.title);
840
841
  }
841
- ) }) }, subItem.title)) }) })
842
+ return /* @__PURE__ */ jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsx(Link, { href: subItem.url, onClick: handleClick, children: /* @__PURE__ */ jsx("span", { children: subItem.title }) }) }) }, subItem.title);
843
+ }) }) })
842
844
  ] })
843
845
  },
844
846
  item.title
845
847
  );
846
848
  }
849
+ if (isCrossAppPath(item.url)) {
850
+ return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
851
+ SidebarMenuButton,
852
+ {
853
+ asChild: true,
854
+ tooltip: item.title,
855
+ isActive,
856
+ children: /* @__PURE__ */ jsxs("a", { href: item.url, onClick: handleClick, children: [
857
+ item.icon && /* @__PURE__ */ jsx(item.icon, {}),
858
+ /* @__PURE__ */ jsx("span", { children: item.title })
859
+ ] })
860
+ }
861
+ ) }, item.title);
862
+ }
847
863
  return /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
848
864
  SidebarMenuButton,
849
865
  {
850
866
  asChild: true,
851
867
  tooltip: item.title,
852
868
  isActive,
853
- children: /* @__PURE__ */ jsxs(
854
- Link,
855
- {
856
- href: item.url,
857
- onClick: () => {
858
- if (isMobile) {
859
- setOpenMobile(false);
860
- }
861
- },
862
- children: [
863
- item.icon && /* @__PURE__ */ jsx(item.icon, {}),
864
- /* @__PURE__ */ jsx("span", { children: item.title })
865
- ]
866
- }
867
- )
869
+ children: /* @__PURE__ */ jsxs(Link, { href: item.url, onClick: handleClick, children: [
870
+ item.icon && /* @__PURE__ */ jsx(item.icon, {}),
871
+ /* @__PURE__ */ jsx("span", { children: item.title })
872
+ ] })
868
873
  }
869
874
  ) }, item.title);
870
875
  }) })