@lastbrain/app 0.1.28 → 0.1.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AdminLayoutWithSidebar.d.ts","sourceRoot":"","sources":["../../src/layouts/AdminLayoutWithSidebar.tsx"],"names":[],"mappings":"AAMA,UAAU,2BAA2B;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,SAAc,GACf,EAAE,2BAA2B,2CAkB7B"}
1
+ {"version":3,"file":"AdminLayoutWithSidebar.d.ts","sourceRoot":"","sources":["../../src/layouts/AdminLayoutWithSidebar.tsx"],"names":[],"mappings":"AAMA,UAAU,2BAA2B;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,SAAc,GACf,EAAE,2BAA2B,2CA8B7B"}
@@ -1,9 +1,12 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { AdminLayout } from "./AdminLayout.js";
4
- import { AppAside } from "@lastbrain/ui";
4
+ import { AppAside, AppAsideSkeleton } from "@lastbrain/ui";
5
5
  import { useAuthSession } from "../auth/useAuthSession.js";
6
6
  export function AdminLayoutWithSidebar({ children, menuConfig, className = "", }) {
7
7
  const { isSuperAdmin } = useAuthSession();
8
- return (_jsxs("div", { className: "flex min-h-screen", children: [menuConfig && (_jsx(AppAside, { menuConfig: menuConfig, isSuperAdmin: isSuperAdmin, className: className })), _jsx("div", { className: `flex-1 ${menuConfig ? "lg:ml-72" : ""}`, children: _jsx(AdminLayout, { children: children }) })] }));
8
+ // Détecter si on est dans la section admin pour le skeleton
9
+ const isAdminSection = typeof window !== "undefined" &&
10
+ window.location.pathname.startsWith("/admin");
11
+ return (_jsxs("div", { className: "flex min-h-screen", children: [!menuConfig ? (_jsx(AppAsideSkeleton, { className: className, isAdminSection: isAdminSection })) : (_jsx(AppAside, { menuConfig: menuConfig, isSuperAdmin: isSuperAdmin, className: className })), _jsx("div", { className: "flex-1 lg:ml-72", children: _jsx(AdminLayout, { children: children }) })] }));
9
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AuthLayoutWithSidebar.d.ts","sourceRoot":"","sources":["../../src/layouts/AuthLayoutWithSidebar.tsx"],"names":[],"mappings":"AAMA,UAAU,0BAA0B;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,UAAU,EACV,SAAc,GACf,EAAE,0BAA0B,2CAkB5B"}
1
+ {"version":3,"file":"AuthLayoutWithSidebar.d.ts","sourceRoot":"","sources":["../../src/layouts/AuthLayoutWithSidebar.tsx"],"names":[],"mappings":"AAMA,UAAU,0BAA0B;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,qBAAqB,CAAC,EACpC,QAAQ,EACR,UAAU,EACV,SAAc,GACf,EAAE,0BAA0B,2CA2B5B"}
@@ -1,9 +1,11 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { AuthLayout } from "./AuthLayout.js";
4
- import { AppAside } from "@lastbrain/ui";
4
+ import { AppAside, AppAsideSkeleton } from "@lastbrain/ui";
5
5
  import { useAuthSession } from "../auth/useAuthSession.js";
6
6
  export function AuthLayoutWithSidebar({ children, menuConfig, className = "", }) {
7
7
  const { isSuperAdmin } = useAuthSession();
8
- return (_jsxs("div", { className: "flex min-h-screen", children: [menuConfig && (_jsx(AppAside, { menuConfig: menuConfig, isSuperAdmin: isSuperAdmin, className: className })), _jsx("div", { className: `flex-1 ${menuConfig ? "lg:ml-72" : ""}`, children: _jsx(AuthLayout, { children: children }) })] }));
8
+ // Pour la section auth, isAdminSection sera false
9
+ const isAdminSection = false;
10
+ return (_jsxs("div", { className: "flex min-h-screen", children: [!menuConfig ? (_jsx(AppAsideSkeleton, { className: className, isAdminSection: isAdminSection })) : (_jsx(AppAside, { menuConfig: menuConfig, isSuperAdmin: isSuperAdmin, className: className })), _jsx("div", { className: "flex-1 lg:ml-72", children: _jsx(AuthLayout, { children: children }) })] }));
9
11
  }
@@ -231,6 +231,8 @@ async function addDependencies(targetDir, useHeroUI, withAuth, selectedModules =
231
231
  "@lastbrain/core": versions.core,
232
232
  "@lastbrain/ui": versions.ui,
233
233
  "next-themes": "^0.4.6",
234
+ "pino": "^10.1.0",
235
+ "pino-pretty": "^13.1.2",
234
236
  };
235
237
  // Ajouter module-auth si demandé
236
238
  if (withAuth) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lastbrain/app",
3
- "version": "0.1.28",
3
+ "version": "0.1.30",
4
4
  "description": "Framework modulaire Next.js avec CLI et système de modules",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { AdminLayout } from "./AdminLayout.js";
4
- import { AppAside } from "@lastbrain/ui";
4
+ import { AppAside, AppAsideSkeleton } from "@lastbrain/ui";
5
5
  import { useAuthSession } from "../auth/useAuthSession.js";
6
6
 
7
7
  interface AdminLayoutWithSidebarProps {
@@ -17,17 +17,29 @@ export function AdminLayoutWithSidebar({
17
17
  }: AdminLayoutWithSidebarProps) {
18
18
  const { isSuperAdmin } = useAuthSession();
19
19
 
20
+ // Détecter si on est dans la section admin pour le skeleton
21
+ const isAdminSection =
22
+ typeof window !== "undefined" &&
23
+ window.location.pathname.startsWith("/admin");
24
+
20
25
  return (
21
26
  <div className="flex min-h-screen">
22
- {menuConfig && (
27
+ {/* Afficher le skeleton pendant le chargement ou si pas de menuConfig */}
28
+ {!menuConfig ? (
29
+ <AppAsideSkeleton
30
+ className={className}
31
+ isAdminSection={isAdminSection}
32
+ />
33
+ ) : (
23
34
  <AppAside
24
35
  menuConfig={menuConfig}
25
36
  isSuperAdmin={isSuperAdmin}
26
37
  className={className}
27
38
  />
28
39
  )}
40
+
29
41
  {/* Contenu principal avec marge pour la sidebar */}
30
- <div className={`flex-1 ${menuConfig ? "lg:ml-72" : ""}`}>
42
+ <div className="flex-1 lg:ml-72">
31
43
  <AdminLayout>{children}</AdminLayout>
32
44
  </div>
33
45
  </div>
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { AuthLayout } from "./AuthLayout.js";
4
- import { AppAside } from "@lastbrain/ui";
4
+ import { AppAside, AppAsideSkeleton } from "@lastbrain/ui";
5
5
  import { useAuthSession } from "../auth/useAuthSession.js";
6
6
 
7
7
  interface AuthLayoutWithSidebarProps {
@@ -17,9 +17,18 @@ export function AuthLayoutWithSidebar({
17
17
  }: AuthLayoutWithSidebarProps) {
18
18
  const { isSuperAdmin } = useAuthSession();
19
19
 
20
+ // Pour la section auth, isAdminSection sera false
21
+ const isAdminSection = false;
22
+
20
23
  return (
21
24
  <div className="flex min-h-screen">
22
- {menuConfig && (
25
+ {/* Afficher le skeleton pendant le chargement ou si pas de menuConfig */}
26
+ {!menuConfig ? (
27
+ <AppAsideSkeleton
28
+ className={className}
29
+ isAdminSection={isAdminSection}
30
+ />
31
+ ) : (
23
32
  <AppAside
24
33
  menuConfig={menuConfig}
25
34
  isSuperAdmin={isSuperAdmin}
@@ -27,7 +36,7 @@ export function AuthLayoutWithSidebar({
27
36
  />
28
37
  )}
29
38
  {/* Contenu principal avec marge pour la sidebar */}
30
- <div className={`flex-1 ${menuConfig ? "lg:ml-72" : ""}`}>
39
+ <div className="flex-1 lg:ml-72">
31
40
  <AuthLayout>{children}</AuthLayout>
32
41
  </div>
33
42
  </div>
@@ -328,6 +328,8 @@ async function addDependencies(
328
328
  "@lastbrain/core": versions.core,
329
329
  "@lastbrain/ui": versions.ui,
330
330
  "next-themes": "^0.4.6",
331
+ "pino": "^10.1.0",
332
+ "pino-pretty": "^13.1.2",
331
333
  };
332
334
 
333
335
  // Ajouter module-auth si demandé