@logickernel/bridge 0.9.7 → 0.9.8

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.
@@ -800,59 +800,83 @@ function NavMain({ items }) {
800
800
  groupsCount: groups.length,
801
801
  groups: groups.map((group) => ({
802
802
  hasLabel: !!group.label,
803
+ labelTitle: group.label?.title,
803
804
  itemsCount: group.items.length,
804
805
  items: group.items.map((item) => item.title)
805
806
  }))
806
807
  });
808
+ const firstGroup = groups.length > 0 ? groups[0] : null;
809
+ console.log("[NavMain] Will render:", {
810
+ groupsLength: groups.length,
811
+ willRender: groups.length > 0,
812
+ firstGroupHasItems: firstGroup ? firstGroup.items.length > 0 : false,
813
+ firstGroupHasLabel: !!firstGroup?.label
814
+ });
815
+ }
816
+ if (groups.length === 0) {
817
+ if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
818
+ console.warn("[NavMain] No groups to render, returning null");
819
+ }
820
+ return null;
807
821
  }
808
- return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: groups.map((group, groupIndex) => /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroup, { children: [
809
- group.label && /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroupLabel, { children: [
810
- group.label.icon && /* @__PURE__ */ jsxRuntime.jsx(group.label.icon, { className: "mr-2" }),
811
- group.label.title
812
- ] }),
813
- group.items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(SidebarMenu, { children: group.items.map((item) => {
814
- const isActive = pathname === item.url || item.isActive;
815
- const hasSubItems = item.items && item.items.length > 0;
816
- if (hasSubItems) {
817
- return /* @__PURE__ */ jsxRuntime.jsx(
818
- Collapsible,
822
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: groups.map((group, groupIndex) => {
823
+ if (typeof window !== "undefined" && process.env.NODE_ENV === "development") {
824
+ console.log(`[NavMain] Rendering group ${groupIndex}:`, {
825
+ hasLabel: !!group.label,
826
+ itemsCount: group.items.length,
827
+ willRenderLabel: !!group.label,
828
+ willRenderItems: group.items.length > 0
829
+ });
830
+ }
831
+ return /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroup, { children: [
832
+ group.label && /* @__PURE__ */ jsxRuntime.jsxs(SidebarGroupLabel, { children: [
833
+ group.label.icon && /* @__PURE__ */ jsxRuntime.jsx(group.label.icon, { className: "mr-2" }),
834
+ group.label.title
835
+ ] }),
836
+ group.items.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(SidebarMenu, { children: group.items.map((item) => {
837
+ const isActive = pathname === item.url || item.isActive;
838
+ const hasSubItems = item.items && item.items.length > 0;
839
+ if (hasSubItems) {
840
+ return /* @__PURE__ */ jsxRuntime.jsx(
841
+ Collapsible,
842
+ {
843
+ asChild: true,
844
+ defaultOpen: isActive,
845
+ className: "group/collapsible",
846
+ children: /* @__PURE__ */ jsxRuntime.jsxs(SidebarMenuItem, { children: [
847
+ /* @__PURE__ */ jsxRuntime.jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
848
+ SidebarMenuButton,
849
+ {
850
+ tooltip: item.title,
851
+ isActive,
852
+ children: [
853
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
854
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title }),
855
+ /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
856
+ ]
857
+ }
858
+ ) }),
859
+ /* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSub, { children: item.items?.map((subItem) => /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: subItem.url, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title }) }) }) }, subItem.title)) }) })
860
+ ] })
861
+ },
862
+ item.title
863
+ );
864
+ }
865
+ return /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
866
+ SidebarMenuButton,
819
867
  {
820
868
  asChild: true,
821
- defaultOpen: isActive,
822
- className: "group/collapsible",
823
- children: /* @__PURE__ */ jsxRuntime.jsxs(SidebarMenuItem, { children: [
824
- /* @__PURE__ */ jsxRuntime.jsx(CollapsibleTrigger2, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
825
- SidebarMenuButton,
826
- {
827
- tooltip: item.title,
828
- isActive,
829
- children: [
830
- item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
831
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title }),
832
- /* @__PURE__ */ jsxRuntime.jsx(LucideIcons.ChevronRight, { className: "ml-auto transition-transform duration-200 group-data-[state=open]/collapsible:rotate-90" })
833
- ]
834
- }
835
- ) }),
836
- /* @__PURE__ */ jsxRuntime.jsx(CollapsibleContent2, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSub, { children: item.items?.map((subItem) => /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubItem, { children: /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuSubButton, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(Link__default.default, { href: subItem.url, children: /* @__PURE__ */ jsxRuntime.jsx("span", { children: subItem.title }) }) }) }, subItem.title)) }) })
869
+ tooltip: item.title,
870
+ isActive,
871
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: item.url, children: [
872
+ item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
873
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title })
837
874
  ] })
838
- },
839
- item.title
840
- );
841
- }
842
- return /* @__PURE__ */ jsxRuntime.jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsxRuntime.jsx(
843
- SidebarMenuButton,
844
- {
845
- asChild: true,
846
- tooltip: item.title,
847
- isActive,
848
- children: /* @__PURE__ */ jsxRuntime.jsxs(Link__default.default, { href: item.url, children: [
849
- item.icon && /* @__PURE__ */ jsxRuntime.jsx(item.icon, {}),
850
- /* @__PURE__ */ jsxRuntime.jsx("span", { children: item.title })
851
- ] })
852
- }
853
- ) }, item.title);
854
- }) })
855
- ] }, groupIndex)) });
875
+ }
876
+ ) }, item.title);
877
+ }) })
878
+ ] }, groupIndex);
879
+ }) });
856
880
  }
857
881
  function Avatar({
858
882
  className,