@getcoherent/core 0.6.32 → 0.6.34

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.d.ts CHANGED
@@ -3467,6 +3467,8 @@ declare class PageGenerator {
3467
3467
  * Generate props string for component
3468
3468
  */
3469
3469
  private generatePropsString;
3470
+ private isSidebarNav;
3471
+ private getBodyClasses;
3470
3472
  /**
3471
3473
  * Get container class based on layout type
3472
3474
  */
package/dist/index.js CHANGED
@@ -5887,6 +5887,17 @@ ${sections}
5887
5887
  });
5888
5888
  return " " + propsArray.join(" ");
5889
5889
  }
5890
+ isSidebarNav() {
5891
+ const navType = this.config.navigation?.type || "header";
5892
+ return navType === "sidebar" || navType === "both";
5893
+ }
5894
+ getBodyClasses() {
5895
+ const base = "bg-background text-foreground antialiased";
5896
+ if (this.isSidebarNav()) {
5897
+ return `min-h-svh ${base}`;
5898
+ }
5899
+ return `min-h-screen flex flex-col ${base}`;
5900
+ }
5890
5901
  /**
5891
5902
  * Get container class based on layout type
5892
5903
  */
@@ -5959,9 +5970,9 @@ export default function RootLayout({
5959
5970
  <head>
5960
5971
  <style dangerouslySetInnerHTML={{ __html: ${JSON.stringify(cssVars)} }} />
5961
5972
  </head>
5962
- <body className="min-h-screen flex flex-col bg-background text-foreground antialiased">
5973
+ <body className="${this.getBodyClasses()}">
5963
5974
  ${navEnabled ? ` ${navRendered}
5964
- ` : ""} <div className="flex-1 flex flex-col">{children}</div>
5975
+ ` : ""} <div className="flex-1${this.isSidebarNav() ? "" : " flex flex-col"}">{children}</div>
5965
5976
  </body>
5966
5977
  </html>
5967
5978
  )
@@ -6370,7 +6381,7 @@ ${companyColumn}
6370
6381
  }
6371
6382
  }
6372
6383
  const menuItem = (item) => ` <SidebarMenuItem>
6373
- <SidebarMenuButton asChild isActive={pathname === "${item.route}"}>
6384
+ <SidebarMenuButton asChild isActive={pathname?.startsWith("${item.route}")}>
6374
6385
  <Link href="${item.route}">${item.label}</Link>
6375
6386
  </SidebarMenuButton>
6376
6387
  </SidebarMenuItem>`;
@@ -6878,6 +6889,10 @@ async function integrateSharedLayoutIntoRootLayout(projectRoot) {
6878
6889
  const manifest = await loadManifest(projectRoot);
6879
6890
  const layoutComponents = manifest.shared.filter((e) => e.type === "layout");
6880
6891
  if (layoutComponents.length === 0) return false;
6892
+ const hasSidebar = manifest.shared.some(
6893
+ (e) => e.name === "AppSidebar" || e.name === "app-sidebar" || e.name === "Sidebar"
6894
+ );
6895
+ if (hasSidebar) return false;
6881
6896
  const layoutPath = join3(projectRoot, LAYOUT_PATH);
6882
6897
  let content;
6883
6898
  try {
@@ -7345,7 +7360,10 @@ export function cn(...inputs: ClassValue[]) {
7345
7360
  usedIn: ["app/(app)/layout.tsx"]
7346
7361
  });
7347
7362
  }
7348
- await integrateSharedLayoutIntoRootLayout(this.projectRoot);
7363
+ const isSidebar = navType === "sidebar" || navType === "both";
7364
+ if (!isSidebar) {
7365
+ await integrateSharedLayoutIntoRootLayout(this.projectRoot);
7366
+ }
7349
7367
  }
7350
7368
  }
7351
7369
  async generateDefaultPages() {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.6.32",
6
+ "version": "0.6.34",
7
7
  "description": "Core design system engine for Coherent",
8
8
  "type": "module",
9
9
  "main": "./dist/index.js",