@lastbrain/app 0.1.43 → 0.1.45

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.
Files changed (48) hide show
  1. package/dist/__tests__/module-registry.test.js +1 -1
  2. package/dist/layouts/AdminLayoutWithSidebar.d.ts +2 -1
  3. package/dist/layouts/AdminLayoutWithSidebar.d.ts.map +1 -1
  4. package/dist/layouts/AdminLayoutWithSidebar.js +10 -4
  5. package/dist/layouts/AuthLayoutWithSidebar.d.ts +2 -1
  6. package/dist/layouts/AuthLayoutWithSidebar.d.ts.map +1 -1
  7. package/dist/layouts/AuthLayoutWithSidebar.js +10 -4
  8. package/dist/layouts/PublicLayout.d.ts +2 -1
  9. package/dist/layouts/PublicLayout.d.ts.map +1 -1
  10. package/dist/layouts/PublicLayoutWithSidebar.d.ts +2 -1
  11. package/dist/layouts/PublicLayoutWithSidebar.d.ts.map +1 -1
  12. package/dist/layouts/PublicLayoutWithSidebar.js +10 -4
  13. package/dist/scripts/db-migrations-sync.js +67 -38
  14. package/dist/scripts/dev-sync.js +1 -0
  15. package/dist/scripts/init-app.d.ts.map +1 -1
  16. package/dist/scripts/init-app.js +41 -9
  17. package/dist/scripts/module-build.d.ts.map +1 -1
  18. package/dist/scripts/module-build.js +17 -5
  19. package/dist/scripts/module-create.d.ts.map +1 -1
  20. package/dist/scripts/module-create.js +19 -0
  21. package/dist/scripts/module-delete.d.ts.map +1 -1
  22. package/dist/scripts/module-delete.js +6 -2
  23. package/dist/scripts/module-list.d.ts.map +1 -1
  24. package/dist/scripts/module-list.js +1 -1
  25. package/dist/styles.css +1 -1
  26. package/dist/templates/DefaultDoc.d.ts.map +1 -1
  27. package/dist/templates/DefaultDoc.js +6 -13
  28. package/dist/templates/DocPage.d.ts.map +1 -1
  29. package/dist/templates/DocPage.js +3 -5
  30. package/dist/templates/SimpleDocPage.js +2 -2
  31. package/dist/templates/SimpleHomePage.js +1 -1
  32. package/package.json +9 -3
  33. package/src/__tests__/module-registry.test.ts +1 -1
  34. package/src/layouts/AdminLayoutWithSidebar.tsx +13 -6
  35. package/src/layouts/AuthLayoutWithSidebar.tsx +13 -6
  36. package/src/layouts/PublicLayout.tsx +2 -2
  37. package/src/layouts/PublicLayoutWithSidebar.tsx +13 -6
  38. package/src/scripts/db-migrations-sync.ts +86 -57
  39. package/src/scripts/dev-sync.ts +1 -0
  40. package/src/scripts/init-app.ts +47 -9
  41. package/src/scripts/module-build.ts +19 -5
  42. package/src/scripts/module-create.ts +25 -2
  43. package/src/scripts/module-delete.ts +8 -6
  44. package/src/scripts/module-list.ts +1 -4
  45. package/src/templates/DefaultDoc.tsx +346 -492
  46. package/src/templates/DocPage.tsx +37 -19
  47. package/src/templates/SimpleDocPage.tsx +2 -2
  48. package/src/templates/SimpleHomePage.tsx +3 -3
@@ -4,7 +4,6 @@ import React, { useState, useEffect } from "react";
4
4
  import {
5
5
  Card,
6
6
  CardBody,
7
- CardHeader,
8
7
  Listbox,
9
8
  ListboxItem,
10
9
  Chip,
@@ -13,7 +12,8 @@ import {
13
12
  DrawerContent,
14
13
  DrawerHeader,
15
14
  DrawerBody,
16
- Snippet,
15
+ Accordion,
16
+ AccordionItem,
17
17
  } from "@lastbrain/ui";
18
18
  import {
19
19
  Menu,
@@ -358,8 +358,9 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
358
358
 
359
359
  {/* Modules section */}
360
360
  {modules.length > 0 && (
361
- <div className="space-y-6">
362
- <Card id="section-modules" className="scroll-mt-32">
361
+ <div id="section-modules">
362
+ <Accordion variant="splitted">
363
+ {/* <Card id="section-modules" className="scroll-mt-32">
363
364
  <CardHeader>
364
365
  <h2 className="text-2xl font-semibold">
365
366
  Modules disponibles
@@ -371,7 +372,7 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
371
372
  LastBrain. Les modules actifs sont utilisés dans votre
372
373
  application.
373
374
  </p>
374
- <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
375
+ <div className="grid grid-cols-1 gap-4">
375
376
  {modules.map((module) => (
376
377
  <Card
377
378
  key={module.id}
@@ -405,7 +406,7 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
405
406
  {!module.available && (
406
407
  <div className="flex justify-between items-center text-xs text-default-700 mt-2">
407
408
  <span>Pour activer : </span>
408
- <Snippet hideSymbol color="primary">
409
+ <Snippet size="sm" hideSymbol color="primary">
409
410
  {`pnpm lastbrain add-module ${module.id}`}
410
411
  </Snippet>
411
412
  </div>
@@ -415,20 +416,37 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
415
416
  ))}
416
417
  </div>
417
418
  </CardBody>
418
- </Card>
419
+ </Card> */}
419
420
 
420
- {/* Module documentation - seulement pour les modules actifs */}
421
- {modules
422
- .filter((m) => m.available)
423
- .map((module) => (
424
- <div
425
- key={module.id}
426
- id={`module-${module.id}`}
427
- className="scroll-mt-32"
428
- >
429
- {module.content}
430
- </div>
431
- ))}
421
+ {modules
422
+ .filter((m) => m.available)
423
+ .map((module) => (
424
+ <AccordionItem
425
+ key={module.id}
426
+ id={`module-${module.id}`}
427
+ className="my-4"
428
+ title={
429
+ <div className="flex justify-between">
430
+ <div className="flex flex-inline items-center gap-2">
431
+ <Package size={20} className="shrink-0" />
432
+ <span>{module.name}</span>
433
+ </div>
434
+ <Chip
435
+ size="sm"
436
+ color={module.available ? "success" : "warning"}
437
+ variant="flat"
438
+ >
439
+ {module.available ? "Actif" : "Inactif"}
440
+ </Chip>
441
+ </div>
442
+ }
443
+ >
444
+ <div key={module.id} className="scroll-mt-32">
445
+ {module.content}
446
+ </div>
447
+ </AccordionItem>
448
+ ))}
449
+ </Accordion>
432
450
  </div>
433
451
  )}
434
452
  </main>
@@ -61,7 +61,7 @@ export function SimpleDocPage() {
61
61
  <main className="flex-1 space-y-8">
62
62
  {/* Introduction */}
63
63
  <section id="intro">
64
- <h1 className="text-4xl font-bold mb-4 bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
64
+ <h1 className="text-4xl font-bold mb-4 bg-linear-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent">
65
65
  Documentation LastBrain
66
66
  </h1>
67
67
  <p className="text-xl text-slate-600 dark:text-slate-400 mb-6">
@@ -532,7 +532,7 @@ where email = 'votre@email.com';`}</span>
532
532
 
533
533
  {/* Resources supplémentaires */}
534
534
  <section id="resources">
535
- <Card className="bg-gradient-to-r from-blue-50 to-purple-50 dark:from-blue-950/30 dark:to-purple-950/30 border-blue-200 dark:border-blue-800">
535
+ <Card className="bg-linear-to-r from-blue-50 to-purple-50 dark:from-blue-950/30 dark:to-purple-950/30 border-blue-200 dark:border-blue-800">
536
536
  <CardHeader className="pb-0">
537
537
  <h2 className="text-3xl font-semibold">
538
538
  📚 Resources Supplémentaires
@@ -28,7 +28,7 @@ export function SimpleHomePage({ showAuth }: HomePageProps) {
28
28
  return (
29
29
  <div className="min-h-screen">
30
30
  {/* Hero Section */}
31
- <section className="relative overflow-hidden bg-gradient-to-br from-blue-50 via-purple-50 to-pink-50 dark:from-slate-900 dark:via-purple-900/20 dark:to-blue-900/20">
31
+ <section className="relative overflow-hidden bg-linear-to-r from-blue-50 via-purple-50 to-pink-50 dark:from-slate-900 dark:via-purple-900/20 dark:to-blue-900/20">
32
32
  <div className="absolute inset-0 bg-grid-slate-200/50 dark:bg-grid-slate-700/25 mask-[radial-gradient(ellipse_at_center,transparent_20%,black)]"></div>
33
33
 
34
34
  <div className="relative container mx-auto px-4 py-24 md:py-32">
@@ -40,7 +40,7 @@ export function SimpleHomePage({ showAuth }: HomePageProps) {
40
40
  </span>
41
41
  </div>
42
42
 
43
- <h1 className="text-5xl md:text-7xl font-bold mb-6 bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600 bg-clip-text text-transparent">
43
+ <h1 className="text-5xl md:text-7xl font-bold mb-6 bg-linear-to-r from-blue-600 via-purple-600 to-pink-600 bg-clip-text text-transparent">
44
44
  Bienvenue sur LastBrain
45
45
  </h1>
46
46
 
@@ -358,7 +358,7 @@ export function SimpleHomePage({ showAuth }: HomePageProps) {
358
358
  </section>
359
359
 
360
360
  {/* CTA Section */}
361
- <section className="py-20 bg-gradient-to-r from-blue-600 to-purple-600 text-white">
361
+ <section className="py-20 bg-linear-to-r from-blue-600 to-purple-600 text-white">
362
362
  <div className="container mx-auto px-4">
363
363
  <div className="max-w-3xl mx-auto text-center">
364
364
  <h2 className="text-3xl md:text-4xl font-bold mb-4">