@lastbrain/app 0.1.47 → 1.0.1
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/app-shell/layout.d.ts +1 -1
- package/dist/app-shell/layout.d.ts.map +1 -1
- package/dist/app-shell/layout.js +1 -1
- package/dist/components/NotificationContainer.js +1 -1
- package/dist/index.d.ts +19 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -19
- package/dist/layouts/AdminLayoutWithSidebar.d.ts +3 -2
- package/dist/layouts/AdminLayoutWithSidebar.d.ts.map +1 -1
- package/dist/layouts/AdminLayoutWithSidebar.js +5 -5
- package/dist/layouts/AppProviders.d.ts +1 -1
- package/dist/layouts/AppProviders.d.ts.map +1 -1
- package/dist/layouts/AppProviders.js +3 -3
- package/dist/layouts/AuthLayoutWithSidebar.d.ts +7 -4
- package/dist/layouts/AuthLayoutWithSidebar.d.ts.map +1 -1
- package/dist/layouts/AuthLayoutWithSidebar.js +5 -5
- package/dist/layouts/PublicLayoutWithSidebar.js +2 -2
- package/dist/layouts/RootLayout.js +1 -1
- package/dist/scripts/init-app.d.ts.map +1 -1
- package/dist/scripts/init-app.js +457 -39
- package/dist/scripts/module-add.js +1 -1
- package/dist/scripts/module-build.d.ts.map +1 -1
- package/dist/scripts/module-build.js +36 -15
- package/dist/scripts/module-create.js +8 -8
- package/dist/scripts/module-delete.d.ts.map +1 -1
- package/dist/scripts/module-delete.js +1 -1
- package/dist/templates/DefaultDoc.js +1 -1
- package/dist/templates/DocPage.js +1 -1
- package/dist/templates/DocsPageWithModules.js +1 -1
- package/dist/types/menu.d.ts +23 -0
- package/dist/types/menu.d.ts.map +1 -0
- package/dist/types/menu.js +1 -0
- package/package.json +9 -1
- package/src/app-shell/layout.tsx +1 -1
- package/src/components/NotificationContainer.tsx +1 -1
- package/src/index.ts +24 -19
- package/src/layouts/AdminLayoutWithSidebar.tsx +11 -3
- package/src/layouts/AppProviders.tsx +4 -4
- package/src/layouts/AuthLayoutWithSidebar.tsx +18 -4
- package/src/layouts/PublicLayoutWithSidebar.tsx +2 -2
- package/src/layouts/RootLayout.tsx +1 -1
- package/src/scripts/init-app.ts +479 -49
- package/src/scripts/module-add.ts +1 -1
- package/src/scripts/module-build.ts +46 -22
- package/src/scripts/module-create.ts +8 -8
- package/src/scripts/module-delete.ts +1 -4
- package/src/templates/DefaultDoc.tsx +1 -1
- package/src/templates/DocPage.tsx +1 -1
- package/src/templates/DocsPageWithModules.tsx +1 -1
- package/src/types/menu.ts +18 -0
|
@@ -4,7 +4,7 @@ import { createRequire } from "node:module";
|
|
|
4
4
|
// Utiliser PROJECT_ROOT si défini (pour pnpm --filter), sinon process.cwd()
|
|
5
5
|
const projectRoot = process.env.PROJECT_ROOT || process.cwd();
|
|
6
6
|
// Si on est dans une app, monter jusqu'à la racine du monorepo
|
|
7
|
-
const
|
|
7
|
+
const _monorepoRoot = projectRoot.includes("/apps/")
|
|
8
8
|
? path.resolve(projectRoot, "..", "..")
|
|
9
9
|
: projectRoot;
|
|
10
10
|
const appDirectory = path.join(projectRoot, "app");
|
|
@@ -176,6 +176,11 @@ function buildPage(moduleConfig, page) {
|
|
|
176
176
|
const isUserDetailPage = page.section === "admin" &&
|
|
177
177
|
page.path.includes("users/[id]") &&
|
|
178
178
|
page.componentExport === "UserPage";
|
|
179
|
+
// Détecter les pages légales qui utilisent cookies (privacy, terms, returns)
|
|
180
|
+
const isLegalPage = page.section === "public" &&
|
|
181
|
+
(page.path.includes("privacy") ||
|
|
182
|
+
page.path.includes("terms") ||
|
|
183
|
+
page.path.includes("returns"));
|
|
179
184
|
let content;
|
|
180
185
|
if (isUserDetailPage) {
|
|
181
186
|
// Page spéciale SSR avec injection des user tabs
|
|
@@ -214,7 +219,18 @@ const ${page.componentExport} = dynamic(
|
|
|
214
219
|
{ ssr: false }
|
|
215
220
|
);
|
|
216
221
|
|
|
217
|
-
export default function ${wrapperName}${hasDynamicParams ? "(props:
|
|
222
|
+
export default function ${wrapperName}${hasDynamicParams ? "(props: Record<string, unknown>)" : "()"} {
|
|
223
|
+
return <${page.componentExport} ${hasDynamicParams ? "{...props}" : ""} />;
|
|
224
|
+
}
|
|
225
|
+
`;
|
|
226
|
+
}
|
|
227
|
+
else if (isLegalPage) {
|
|
228
|
+
content = `// GENERATED BY LASTBRAIN MODULE BUILD
|
|
229
|
+
import { ${page.componentExport} } from "${moduleConfig.moduleName}";
|
|
230
|
+
|
|
231
|
+
export const dynamic = 'force-dynamic';
|
|
232
|
+
|
|
233
|
+
export default function ${wrapperName}${hasDynamicParams ? "(props: Record<string, unknown>)" : "()"} {
|
|
218
234
|
return <${page.componentExport} ${hasDynamicParams ? "{...props}" : ""} />;
|
|
219
235
|
}
|
|
220
236
|
`;
|
|
@@ -223,7 +239,7 @@ export default function ${wrapperName}${hasDynamicParams ? "(props: any)" : "()"
|
|
|
223
239
|
content = `// GENERATED BY LASTBRAIN MODULE BUILD
|
|
224
240
|
import { ${page.componentExport} } from "${moduleConfig.moduleName}";
|
|
225
241
|
|
|
226
|
-
export default function ${wrapperName}${hasDynamicParams ? "(props:
|
|
242
|
+
export default function ${wrapperName}${hasDynamicParams ? "(props: Record<string, unknown>)" : "()"} {
|
|
227
243
|
return <${page.componentExport} ${hasDynamicParams ? "{...props}" : ""} />;
|
|
228
244
|
}
|
|
229
245
|
`;
|
|
@@ -832,25 +848,30 @@ async function generateUserTabsConfig(moduleConfigs) {
|
|
|
832
848
|
moduleName: config.moduleName,
|
|
833
849
|
})))
|
|
834
850
|
.sort((a, b) => (a.order || 0) - (b.order || 0));
|
|
851
|
+
let appContent;
|
|
835
852
|
if (userTabsConfigs.length === 0) {
|
|
836
|
-
console.log("⏭️ No user tabs configuration found in modules");
|
|
837
|
-
|
|
853
|
+
console.log("⏭️ No user tabs configuration found in modules, creating empty config");
|
|
854
|
+
// Créer un fichier vide avec l'interface correcte
|
|
855
|
+
const timestamp = new Date().toISOString();
|
|
856
|
+
appContent = `// GENERATED FILE - DO NOT EDIT MANUALLY\n// User tabs configuration\n// Generated at: ${timestamp}\n\n"use client";\n\nimport type React from "react";\n\nexport interface ModuleUserTab {\n key: string;\n title: string;\n icon?: string;\n component: React.ComponentType<{ userId: string }>;\n}\n\nexport const moduleUserTabs: ModuleUserTab[] = [];\n\nexport default moduleUserTabs;\n`;
|
|
838
857
|
}
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
858
|
+
else {
|
|
859
|
+
// Générer les imports statiques (Next/dynamic pour chaque composant)
|
|
860
|
+
const importsForApp = userTabsConfigs
|
|
861
|
+
.map((tab) => `const ${tab.componentExport} = dynamic(() => import("${tab.moduleName}").then(mod => ({ default: mod.${tab.componentExport} })), { ssr: true });`)
|
|
862
|
+
.join("\n");
|
|
863
|
+
// Générer le tableau des tabs
|
|
864
|
+
const tabsArray = userTabsConfigs
|
|
865
|
+
.map((tab) => ` {
|
|
846
866
|
key: "${tab.key}",
|
|
847
867
|
title: "${tab.title}",
|
|
848
868
|
icon: "${tab.icon || ""}",
|
|
849
869
|
component: ${tab.componentExport},
|
|
850
870
|
}`)
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
871
|
+
.join(",\n");
|
|
872
|
+
const timestamp = new Date().toISOString();
|
|
873
|
+
appContent = `// GENERATED FILE - DO NOT EDIT MANUALLY\n// User tabs configuration\n// Generated at: ${timestamp}\n\n"use client";\n\nimport dynamic from "next/dynamic";\nimport type React from "react";\n\n${importsForApp}\n\nexport interface ModuleUserTab {\n key: string;\n title: string;\n icon?: string;\n component: React.ComponentType<{ userId: string }>;\n}\n\nexport const moduleUserTabs: ModuleUserTab[] = [\n${tabsArray}\n];\n\nexport default moduleUserTabs;\n`;
|
|
874
|
+
}
|
|
854
875
|
// Créer le fichier de configuration (uniquement dans /config)
|
|
855
876
|
const outputPath = path.join(projectRoot, "config", "user-tabs.ts");
|
|
856
877
|
const configDir = path.dirname(outputPath);
|
|
@@ -321,7 +321,7 @@ export { default as buildConfig } from "./${moduleNameOnly}.build.config";
|
|
|
321
321
|
/**
|
|
322
322
|
* Génère le contenu du fichier server.ts
|
|
323
323
|
*/
|
|
324
|
-
function
|
|
324
|
+
function _generateServerTs(tables) {
|
|
325
325
|
const exports = [];
|
|
326
326
|
for (const table of tables) {
|
|
327
327
|
for (const section of table.sections) {
|
|
@@ -1116,7 +1116,7 @@ export function getAvailableModuleNames(): string[] {
|
|
|
1116
1116
|
const arrayMatch = content.match(/export const AVAILABLE_MODULES: ModuleMetadata\[\] = \[([\s\S]*?)\];/);
|
|
1117
1117
|
if (arrayMatch) {
|
|
1118
1118
|
const arrayContent = arrayMatch[1];
|
|
1119
|
-
const
|
|
1119
|
+
const _lastItem = arrayContent.trim().split("\n").pop();
|
|
1120
1120
|
// Ajouter le nouveau module à la fin du tableau
|
|
1121
1121
|
const newArrayContent = arrayContent.trimEnd() + "\n" + moduleEntry + "\n";
|
|
1122
1122
|
content = content.replace(/export const AVAILABLE_MODULES: ModuleMetadata\[\] = \[([\s\S]*?)\];/, `export const AVAILABLE_MODULES: ModuleMetadata[] = [${newArrayContent}];`);
|
|
@@ -1127,8 +1127,8 @@ export function getAvailableModuleNames(): string[] {
|
|
|
1127
1127
|
console.log(chalk.yellow(" ⚠️ Format du registre non reconnu, ajout manuel requis"));
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
catch (
|
|
1131
|
-
console.log(chalk.yellow(` ⚠️ Erreur lors de la mise à jour du registre: ${
|
|
1130
|
+
catch (_error) {
|
|
1131
|
+
console.log(chalk.yellow(` ⚠️ Erreur lors de la mise à jour du registre: ${_error}`));
|
|
1132
1132
|
console.log(chalk.gray(" Vous devrez ajouter manuellement le module au registre"));
|
|
1133
1133
|
}
|
|
1134
1134
|
}
|
|
@@ -1243,7 +1243,7 @@ export async function createModuleStructure(config, rootDir) {
|
|
|
1243
1243
|
});
|
|
1244
1244
|
console.log(chalk.green("\n✅ Dépendances installées avec succès!"));
|
|
1245
1245
|
}
|
|
1246
|
-
catch (
|
|
1246
|
+
catch (_error) {
|
|
1247
1247
|
console.log(chalk.yellow("\n⚠️ Erreur lors de l'installation, veuillez exécuter manuellement:"));
|
|
1248
1248
|
console.log(chalk.gray(` cd ${moduleDir} && pnpm install`));
|
|
1249
1249
|
}
|
|
@@ -1259,7 +1259,7 @@ export async function createModuleStructure(config, rootDir) {
|
|
|
1259
1259
|
});
|
|
1260
1260
|
console.log(chalk.green("✓ Module compilé"));
|
|
1261
1261
|
}
|
|
1262
|
-
catch (
|
|
1262
|
+
catch (_error) {
|
|
1263
1263
|
console.log(chalk.yellow("⚠️ Build automatique échoué, exécutez: cd"), config.slug, "&& pnpm build");
|
|
1264
1264
|
}
|
|
1265
1265
|
console.log(chalk.green(`\n✅ Module ${config.slug} créé avec succès!\n`));
|
|
@@ -1413,8 +1413,8 @@ export async function createModule() {
|
|
|
1413
1413
|
try {
|
|
1414
1414
|
rootDir = findWorkspaceRoot();
|
|
1415
1415
|
}
|
|
1416
|
-
catch (
|
|
1417
|
-
console.error(chalk.red("❌ " +
|
|
1416
|
+
catch (_error) {
|
|
1417
|
+
console.error(chalk.red("❌ " + _error.message));
|
|
1418
1418
|
process.exit(1);
|
|
1419
1419
|
}
|
|
1420
1420
|
// Créer le module
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-delete.d.ts","sourceRoot":"","sources":["../../src/scripts/module-delete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"module-delete.d.ts","sourceRoot":"","sources":["../../src/scripts/module-delete.ts"],"names":[],"mappings":"AAUA;;;GAGG;AACH,wBAAsB,YAAY,kBAkLjC"}
|
|
@@ -3,7 +3,7 @@ import path from "path";
|
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import inquirer from "inquirer";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
|
-
import { AVAILABLE_MODULES
|
|
6
|
+
import { AVAILABLE_MODULES } from "@lastbrain/core/config/modules";
|
|
7
7
|
const __filename = fileURLToPath(import.meta.url);
|
|
8
8
|
const __dirname = path.dirname(__filename);
|
|
9
9
|
/**
|
|
@@ -236,5 +236,5 @@ export function DocUsageCustom() {
|
|
|
236
236
|
<p>Description...</p>
|
|
237
237
|
</div>
|
|
238
238
|
);
|
|
239
|
-
}` }) }), _jsx("h3", { className: "text-lg font-semibold mb-2", children: "Exporter la documentation" }), _jsxs("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-2", children: ["Dans", " ", _jsx("code", { className: "text-sm bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded", children: "src/index.ts" }), " ", ":"] }), _jsx(Alert, { hideIcon: true, color: "primary", className: "p-4 mb-4", children: _jsx("pre", { className: "whitespace-pre-wrap", children: `export { MonModuleDoc } from "./components/Doc.js";` }) })] })] }), _jsxs(Card, { id: "section-links", className: "scroll-mt-32", children: [_jsx(CardHeader, { children: _jsxs("h2", { className: "text-2xl font-semibold flex items-center gap-2", children: [_jsx(Link, { size: 24 }), "Liens utiles & remerciements \uD83D\uDE4F"] }) }), _jsx(CardBody, { children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [_jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://nextjs.org/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Next.js" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Documentation officielle" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://nextjs.org/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://supabase.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Supabase" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Documentation officielle" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://supabase.com/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://www.heroui.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Heroui" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Composants UI" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://www.heroui.com/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://tailwindcss.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Tailwind CSS" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Framework CSS" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://tailwindcss.com/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://lucide.dev/", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Lucide Icons" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Icones SVG" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://lucide.dev/" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://stripe.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Stripe" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Syst\u00E8me de paiement" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://stripe.com/docs" })] }) })] }) })] }), _jsxs(Card, { id: "section-modules", className: "scroll-mt-32", children: [_jsx(CardHeader, { children: _jsxs("h2", { className: "text-2xl font-semibold flex items-center gap-2", children: [_jsx(Package, { size: 24 }), "Modules"] }) }), _jsxs(CardBody, { className: "space-y-6", children: [_jsx("p", { className: "text-slate-600 dark:text-slate-400", children: "Les modules LastBrain permettent d'ajouter des fonctionnalit\u00E9s compl\u00E8tes \u00E0 votre application de mani\u00E8re modulaire." }), _jsxs("div", { children: [_jsx("h3", { className: "text-xl font-semibold mb-4", children: "Modules Disponibles" }), _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Ai" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 1 auth, 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module ai` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-ai", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Auth" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 3 publique(s), 4 auth, 2 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module auth` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-auth", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Billing Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 3 auth, 2 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module billing-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Cart Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth, 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-cart-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Commerce Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-commerce-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Order Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-order-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Payment Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-payment-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Product Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 publique(s)"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-product-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Legal" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 4 publique(s), 2 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module legal` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-legal", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Project Board" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module project-board` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-project-board", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Recipes Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 4 auth"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module recipes-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Tasks" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth, 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module nom-du-module` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-tasks", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) })] })] }), _jsx("h3", { className: "text-lg font-semibold mb-2", children: "Commandes" }), _jsx("h4", { className: "font-medium mb-2", children: "Installer un module" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm lastbrain add-module nom-du-module` }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm build:modules` }), _jsx("h4", { className: "font-medium mb-2", children: "Cr\u00E9er un nouveau module" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm lastbrain create-module nom-du-module` }), _jsx("h4", { className: "font-medium mb-2", children: "G\u00E9n\u00E9rer la documentation des modules" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm generate:module-docs` }), _jsx("h4", { className: "font-medium mb-2", children: "Supprimer un module" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm lastbrain remove-module nom-du-module` }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm build:modules` }), _jsx("h3", { className: "text-lg font-semibold mb-2", children: "D\u00E9veloppement de modules" }), _jsxs("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-2", children: ["Pour cr\u00E9er un nouveau module, consultez la", " ", _jsx("a", { href: "./004_CREATE_MODULE.md", className: "text-blue-600 hover:underline", target: "_blank", rel: "noopener noreferrer", children: "documentation de cr\u00E9ation de modules" }), "."] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-2", children: "La documentation de chaque module est g\u00E9n\u00E9r\u00E9e automatiquement depuis :" }), _jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-green-600", children: "\u2705" }), _jsxs("span", { children: ["Le fichier", " ", _jsx("code", { className: "text-sm bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded", children: "module-name.build.config.ts" }), " ", "pour les pages et APIs"] })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-green-600", children: "\u2705" }), _jsx("span", { children: "Les fichiers de migration SQL pour les tables" })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-green-600", children: "\u2705" }), _jsxs("span", { children: ["Le README.md est auto-g\u00E9n\u00E9r\u00E9 avec", " ", _jsx("code", { className: "text-sm bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded", children: "pnpm generate:module-docs" })] })] })] })] })] })] }));
|
|
239
|
+
}` }) }), _jsx("h3", { className: "text-lg font-semibold mb-2", children: "Exporter la documentation" }), _jsxs("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-2", children: ["Dans", " ", _jsx("code", { className: "text-sm bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded", children: "src/index.ts" }), " ", ":"] }), _jsx(Alert, { hideIcon: true, color: "primary", className: "p-4 mb-4", children: _jsx("pre", { className: "whitespace-pre-wrap", children: `export { MonModuleDoc } from "./components/Doc";` }) })] })] }), _jsxs(Card, { id: "section-links", className: "scroll-mt-32", children: [_jsx(CardHeader, { children: _jsxs("h2", { className: "text-2xl font-semibold flex items-center gap-2", children: [_jsx(Link, { size: 24 }), "Liens utiles & remerciements \uD83D\uDE4F"] }) }), _jsx(CardBody, { children: _jsxs("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4", children: [_jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://nextjs.org/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Next.js" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Documentation officielle" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://nextjs.org/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://supabase.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Supabase" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Documentation officielle" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://supabase.com/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://www.heroui.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Heroui" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Composants UI" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://www.heroui.com/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://tailwindcss.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Tailwind CSS" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Framework CSS" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://tailwindcss.com/docs" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://lucide.dev/", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Lucide Icons" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Icones SVG" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://lucide.dev/" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow", isPressable: true, as: "a", href: "https://stripe.com/docs", target: "_blank", rel: "noopener noreferrer", children: _jsxs(CardBody, { children: [_jsx("h3", { className: "text-lg font-semibold mb-2", children: "Stripe" }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-3", children: "Syst\u00E8me de paiement" }), _jsx("p", { className: "text-xs text-blue-600 dark:text-blue-400 truncate", children: "https://stripe.com/docs" })] }) })] }) })] }), _jsxs(Card, { id: "section-modules", className: "scroll-mt-32", children: [_jsx(CardHeader, { children: _jsxs("h2", { className: "text-2xl font-semibold flex items-center gap-2", children: [_jsx(Package, { size: 24 }), "Modules"] }) }), _jsxs(CardBody, { className: "space-y-6", children: [_jsx("p", { className: "text-slate-600 dark:text-slate-400", children: "Les modules LastBrain permettent d'ajouter des fonctionnalit\u00E9s compl\u00E8tes \u00E0 votre application de mani\u00E8re modulaire." }), _jsxs("div", { children: [_jsx("h3", { className: "text-xl font-semibold mb-4", children: "Modules Disponibles" }), _jsxs("div", { className: "grid grid-cols-1 gap-4", children: [_jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Ai" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 1 auth, 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module ai` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-ai", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Auth" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 3 publique(s), 4 auth, 2 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module auth` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-auth", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Billing Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 3 auth, 2 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module billing-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Cart Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth, 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-cart-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Commerce Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-commerce-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Order Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-order-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Payment Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-payment-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Core Product Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 publique(s)"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module core-product-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Legal" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 4 publique(s), 2 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module legal` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-legal", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Project Board" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module project-board` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-project-board", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-purple-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Recipes Pro" }), _jsx("span", { className: "text-xs bg-purple-100 dark:bg-purple-900 text-purple-800 dark:text-purple-200 px-2 py-1 rounded", children: "PRO" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 4 auth"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module recipes-pro` }), _jsx("span", { className: "text-xs text-slate-500 dark:text-slate-400 inline-flex items-center gap-1", children: "\uD83D\uDD12 Documentation priv\u00E9e" })] }) }), _jsx(Card, { className: "hover:shadow-lg transition-shadow border-l-4 border-l-blue-500", children: _jsxs(CardBody, { className: "space-y-3", children: [_jsxs("div", { className: "flex items-start justify-between", children: [_jsx("h3", { className: "text-lg font-semibold", children: "Tasks" }), _jsx("span", { className: "text-xs bg-blue-100 dark:bg-blue-900 text-blue-800 dark:text-blue-200 px-2 py-1 rounded", children: "FREE" })] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400", children: "Module LastBrain" }), _jsxs("p", { className: "text-xs text-slate-500 dark:text-slate-500", children: [_jsx("strong", { children: "Pages:" }), " 2 auth, 1 admin"] }), _jsx(Snippet, { symbol: "\uD83D\uDCBB", hideSymbol: true, className: "text-sm", children: `pnpm lastbrain add-module nom-du-module` }), _jsx("a", { href: "https://github.com/Lastbrain-labs/lb-starter/tree/main/packages/module-tasks", className: "text-sm text-blue-600 dark:text-blue-400 hover:underline inline-flex items-center gap-1", target: "_blank", rel: "noopener noreferrer", children: "\uD83D\uDCD6 Documentation \u2192" })] }) })] })] }), _jsx("h3", { className: "text-lg font-semibold mb-2", children: "Commandes" }), _jsx("h4", { className: "font-medium mb-2", children: "Installer un module" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm lastbrain add-module nom-du-module` }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm build:modules` }), _jsx("h4", { className: "font-medium mb-2", children: "Cr\u00E9er un nouveau module" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm lastbrain create-module nom-du-module` }), _jsx("h4", { className: "font-medium mb-2", children: "G\u00E9n\u00E9rer la documentation des modules" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm generate:module-docs` }), _jsx("h4", { className: "font-medium mb-2", children: "Supprimer un module" }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm lastbrain remove-module nom-du-module` }), _jsx(Snippet, { symbol: "", hideSymbol: true, className: "text-sm mb-2", children: `pnpm build:modules` }), _jsx("h3", { className: "text-lg font-semibold mb-2", children: "D\u00E9veloppement de modules" }), _jsxs("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-2", children: ["Pour cr\u00E9er un nouveau module, consultez la", " ", _jsx("a", { href: "./004_CREATE_MODULE.md", className: "text-blue-600 hover:underline", target: "_blank", rel: "noopener noreferrer", children: "documentation de cr\u00E9ation de modules" }), "."] }), _jsx("p", { className: "text-sm text-slate-600 dark:text-slate-400 mb-2", children: "La documentation de chaque module est g\u00E9n\u00E9r\u00E9e automatiquement depuis :" }), _jsxs("div", { className: "space-y-2", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-green-600", children: "\u2705" }), _jsxs("span", { children: ["Le fichier", " ", _jsx("code", { className: "text-sm bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded", children: "module-name.build.config.ts" }), " ", "pour les pages et APIs"] })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-green-600", children: "\u2705" }), _jsx("span", { children: "Les fichiers de migration SQL pour les tables" })] }), _jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "text-green-600", children: "\u2705" }), _jsxs("span", { children: ["Le README.md est auto-g\u00E9n\u00E9r\u00E9 avec", " ", _jsx("code", { className: "text-sm bg-slate-100 dark:bg-slate-800 px-2 py-1 rounded", children: "pnpm generate:module-docs" })] })] })] })] })] })] }));
|
|
240
240
|
}
|
|
@@ -4,7 +4,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { useState, useEffect } from "react";
|
|
5
5
|
import { Card, CardBody, Listbox, ListboxItem, Chip, Button, Drawer, DrawerContent, DrawerHeader, DrawerBody, Accordion, AccordionItem, } from "@lastbrain/ui";
|
|
6
6
|
import { Menu, Home, Sparkles, Rocket, Building2, Package, Database, Palette, BookOpen, Link, Blocks, HardDrive, RotateCcw, } from "lucide-react";
|
|
7
|
-
import { DefaultDocumentation } from "./DefaultDoc
|
|
7
|
+
import { DefaultDocumentation } from "./DefaultDoc";
|
|
8
8
|
const NavigationListbox = ({ navigationItems, selectedModule, scrollToSection, setSelectedModule, }) => (_jsx(Listbox, { "aria-label": "Navigation", selectionMode: "single", variant: "solid", selectedKeys: selectedModule ? [selectedModule] : [], onSelectionChange: (keys) => {
|
|
9
9
|
const key = Array.from(keys)[0];
|
|
10
10
|
if (key) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { DocPage } from "./DocPage
|
|
2
|
+
import { DocPage } from "./DocPage";
|
|
3
3
|
export function DocsPageWithModules() {
|
|
4
4
|
// This will be replaced by module-build script with actual module configs
|
|
5
5
|
// MODULES_CONFIG_PLACEHOLDER
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MenuItem } from "@lastbrain/ui";
|
|
2
|
+
/**
|
|
3
|
+
* Menu items to hide from display and block routes
|
|
4
|
+
*/
|
|
5
|
+
export interface MenuIgnored {
|
|
6
|
+
public: {
|
|
7
|
+
title: string;
|
|
8
|
+
path: string;
|
|
9
|
+
}[];
|
|
10
|
+
auth: {
|
|
11
|
+
title: string;
|
|
12
|
+
path: string;
|
|
13
|
+
}[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Custom menu items to add without creating a module
|
|
17
|
+
*/
|
|
18
|
+
export interface MenuCustom {
|
|
19
|
+
public?: MenuItem[];
|
|
20
|
+
auth?: MenuItem[];
|
|
21
|
+
admin?: MenuItem[];
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/types/menu.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lastbrain/app",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Framework modulaire Next.js avec CLI et système de modules",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"type": "public"
|
|
9
9
|
},
|
|
10
10
|
"main": "dist/index.js",
|
|
11
|
+
"module": "src/index.ts",
|
|
11
12
|
"types": "dist/index.d.ts",
|
|
12
13
|
"keywords": [
|
|
13
14
|
"nextjs",
|
|
@@ -33,6 +34,13 @@
|
|
|
33
34
|
"dist",
|
|
34
35
|
"src"
|
|
35
36
|
],
|
|
37
|
+
"exports": {
|
|
38
|
+
".": {
|
|
39
|
+
"types": "./dist/index.d.ts",
|
|
40
|
+
"import": "./dist/index.js",
|
|
41
|
+
"default": "./dist/index.js"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
36
44
|
"dependencies": {
|
|
37
45
|
"@lastbrain/core": "^0.1.0",
|
|
38
46
|
"@lastbrain/ui": "^0.1.0",
|
package/src/app-shell/layout.tsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { Notification } from "@lastbrain/ui";
|
|
4
|
-
import { useNotifications } from "../layouts/AppProviders
|
|
4
|
+
import { useNotifications } from "../layouts/AppProviders";
|
|
5
5
|
|
|
6
6
|
export function NotificationContainer() {
|
|
7
7
|
const { data, loading, markAsRead, markAllAsRead, deleteNotification } =
|
package/src/index.ts
CHANGED
|
@@ -3,28 +3,33 @@ export {
|
|
|
3
3
|
useAuth,
|
|
4
4
|
useModules,
|
|
5
5
|
useNotifications as useNotificationsContext,
|
|
6
|
-
} from "./layouts/AppProviders
|
|
7
|
-
export { useNotifications } from "./hooks/useNotifications
|
|
8
|
-
export { NotificationContainer } from "./components/NotificationContainer
|
|
9
|
-
export { useAuthSession } from "./auth/useAuthSession
|
|
10
|
-
export { signOut, signIn } from "./auth/authHelpers
|
|
11
|
-
export { RootLayout } from "./layouts/RootLayout
|
|
12
|
-
export { PublicLayout } from "./layouts/PublicLayout
|
|
13
|
-
export { PublicLayoutWithSidebar } from "./layouts/PublicLayoutWithSidebar
|
|
14
|
-
export { AuthLayout } from "./layouts/AuthLayout
|
|
15
|
-
export {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
} from "./layouts/AppProviders";
|
|
7
|
+
export { useNotifications } from "./hooks/useNotifications";
|
|
8
|
+
export { NotificationContainer } from "./components/NotificationContainer";
|
|
9
|
+
export { useAuthSession } from "./auth/useAuthSession";
|
|
10
|
+
export { signOut, signIn } from "./auth/authHelpers";
|
|
11
|
+
export { RootLayout } from "./layouts/RootLayout";
|
|
12
|
+
export { PublicLayout } from "./layouts/PublicLayout";
|
|
13
|
+
export { PublicLayoutWithSidebar } from "./layouts/PublicLayoutWithSidebar";
|
|
14
|
+
export { AuthLayout } from "./layouts/AuthLayout";
|
|
15
|
+
export {
|
|
16
|
+
AuthLayoutWithSidebar,
|
|
17
|
+
type AuthLayoutWithSidebarProps,
|
|
18
|
+
type MenuIgnored,
|
|
19
|
+
type MenuCustom,
|
|
20
|
+
} from "./layouts/AuthLayoutWithSidebar";
|
|
21
|
+
export { AdminLayout } from "./layouts/AdminLayout";
|
|
22
|
+
export { AdminLayoutWithSidebar } from "./layouts/AdminLayoutWithSidebar";
|
|
23
|
+
export { getModuleConfigs } from "./modules/module-loader";
|
|
19
24
|
|
|
20
25
|
// Components
|
|
21
26
|
export { AppAside } from "@lastbrain/ui";
|
|
22
27
|
export type { AppAsideMenuItem, AppAsideMenuConfig } from "@lastbrain/ui";
|
|
23
28
|
// Templates de pages (starter + docs)
|
|
24
29
|
|
|
25
|
-
export { SimpleHomePage } from "./templates/SimpleHomePage
|
|
26
|
-
export { DocPage } from "./templates/DocPage
|
|
27
|
-
export { SimpleDocPage } from "./templates/SimpleDocPage
|
|
28
|
-
export { ModuleGuidePage } from "./templates/ModuleGuidePage
|
|
29
|
-
export { AuthGuidePage } from "./templates/AuthGuidePage
|
|
30
|
-
export { MigrationsGuidePage } from "./templates/MigrationsGuidePage
|
|
30
|
+
export { SimpleHomePage } from "./templates/SimpleHomePage";
|
|
31
|
+
export { DocPage } from "./templates/DocPage";
|
|
32
|
+
export { SimpleDocPage } from "./templates/SimpleDocPage";
|
|
33
|
+
export { ModuleGuidePage } from "./templates/ModuleGuidePage";
|
|
34
|
+
export { AuthGuidePage } from "./templates/AuthGuidePage";
|
|
35
|
+
export { MigrationsGuidePage } from "./templates/MigrationsGuidePage";
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { AdminLayout } from "./AdminLayout
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { AdminLayout } from "./AdminLayout";
|
|
4
|
+
import {
|
|
5
|
+
AppAside,
|
|
6
|
+
AppAsideSkeleton,
|
|
7
|
+
type MenuConfig,
|
|
8
|
+
type MenuItem,
|
|
9
|
+
} from "@lastbrain/ui";
|
|
10
|
+
import { useAuthSession } from "../auth/useAuthSession";
|
|
6
11
|
import { usePathname } from "next/navigation";
|
|
7
12
|
import { useEffect, useState } from "react";
|
|
8
13
|
|
|
@@ -10,12 +15,14 @@ interface AdminLayoutWithSidebarProps {
|
|
|
10
15
|
children: React.ReactNode;
|
|
11
16
|
menuConfig?: MenuConfig;
|
|
12
17
|
className?: string;
|
|
18
|
+
menuCustom?: MenuItem[];
|
|
13
19
|
}
|
|
14
20
|
|
|
15
21
|
export function AdminLayoutWithSidebar({
|
|
16
22
|
children,
|
|
17
23
|
menuConfig,
|
|
18
24
|
className = "",
|
|
25
|
+
menuCustom,
|
|
19
26
|
}: AdminLayoutWithSidebarProps) {
|
|
20
27
|
const { isSuperAdmin, loading, user } = useAuthSession();
|
|
21
28
|
const pathname = usePathname();
|
|
@@ -102,6 +109,7 @@ export function AdminLayoutWithSidebar({
|
|
|
102
109
|
isSuperAdmin={isSuperAdmin}
|
|
103
110
|
isAuthenticated={!!user}
|
|
104
111
|
className={className}
|
|
112
|
+
{...(menuCustom ? { menuCustom } : {})}
|
|
105
113
|
/>
|
|
106
114
|
)}
|
|
107
115
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { createContext, useContext, useMemo } from "react";
|
|
4
|
-
import { getModuleConfigs } from "../modules/module-loader
|
|
4
|
+
import { getModuleConfigs } from "../modules/module-loader";
|
|
5
5
|
import { ToastProvider } from "@lastbrain/ui";
|
|
6
6
|
import { RealtimeProvider } from "@lastbrain/core";
|
|
7
|
-
import { useAuthSession } from "../auth/useAuthSession
|
|
8
|
-
import { useNotifications as useNotificationsHook } from "../hooks/useNotifications
|
|
7
|
+
import { useAuthSession } from "../auth/useAuthSession";
|
|
8
|
+
import { useNotifications as useNotificationsHook } from "../hooks/useNotifications";
|
|
9
9
|
import type { User } from "@supabase/supabase-js";
|
|
10
10
|
import type { ModuleRealtimeConfig } from "@lastbrain/core";
|
|
11
|
-
import type { NotificationsData } from "../hooks/useNotifications
|
|
11
|
+
import type { NotificationsData } from "../hooks/useNotifications";
|
|
12
12
|
|
|
13
13
|
const ModuleContext = createContext(getModuleConfigs());
|
|
14
14
|
const NotificationContext = createContext<{
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { AuthLayout } from "./AuthLayout
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { AuthLayout } from "./AuthLayout";
|
|
4
|
+
import {
|
|
5
|
+
AppAside,
|
|
6
|
+
AppAsideSkeleton,
|
|
7
|
+
type MenuConfig,
|
|
8
|
+
type MenuItem,
|
|
9
|
+
} from "@lastbrain/ui";
|
|
10
|
+
import { useAuthSession } from "../auth/useAuthSession";
|
|
11
|
+
import type { MenuIgnored, MenuCustom } from "../types/menu";
|
|
6
12
|
import { useEffect, useState } from "react";
|
|
7
13
|
|
|
8
|
-
|
|
14
|
+
export type { MenuIgnored, MenuCustom };
|
|
15
|
+
|
|
16
|
+
export interface AuthLayoutWithSidebarProps {
|
|
9
17
|
children: React.ReactNode;
|
|
10
18
|
menuConfig?: MenuConfig;
|
|
11
19
|
className?: string;
|
|
20
|
+
menuIgnored?: MenuIgnored;
|
|
21
|
+
menuCustom?: MenuItem[];
|
|
12
22
|
}
|
|
13
23
|
|
|
14
24
|
export function AuthLayoutWithSidebar({
|
|
15
25
|
children,
|
|
16
26
|
menuConfig,
|
|
17
27
|
className = "",
|
|
28
|
+
menuIgnored,
|
|
29
|
+
menuCustom,
|
|
18
30
|
}: AuthLayoutWithSidebarProps) {
|
|
19
31
|
const { isSuperAdmin, loading, user } = useAuthSession();
|
|
20
32
|
const [isCollapsed, setIsCollapsed] = useState(() => {
|
|
@@ -100,6 +112,8 @@ export function AuthLayoutWithSidebar({
|
|
|
100
112
|
isSuperAdmin={isSuperAdmin}
|
|
101
113
|
isAuthenticated={!!user}
|
|
102
114
|
className={className}
|
|
115
|
+
{...(menuIgnored ? { menuIgnored } : {})}
|
|
116
|
+
{...(menuCustom ? { menuCustom } : {})}
|
|
103
117
|
/>
|
|
104
118
|
)}
|
|
105
119
|
{/* Contenu principal avec marge pour la sidebar */}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { PublicLayout } from "./PublicLayout
|
|
3
|
+
import { PublicLayout } from "./PublicLayout";
|
|
4
4
|
import { AppAside, AppAsideSkeleton, type MenuConfig } from "@lastbrain/ui";
|
|
5
|
-
import { useAuthSession } from "../auth/useAuthSession
|
|
5
|
+
import { useAuthSession } from "../auth/useAuthSession";
|
|
6
6
|
import { useEffect, useState } from "react";
|
|
7
7
|
|
|
8
8
|
interface PublicLayoutWithSidebarProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { ThemeProvider } from "next-themes";
|
|
4
|
-
import { AppProviders } from "./AppProviders
|
|
4
|
+
import { AppProviders } from "./AppProviders";
|
|
5
5
|
import type { ModuleRealtimeConfig } from "@lastbrain/core";
|
|
6
6
|
|
|
7
7
|
// Note: L'app Next.js doit importer son propre globals.css dans son layout
|