@lastbrain/app 0.1.36 → 0.1.37

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 (34) hide show
  1. package/dist/__tests__/module-registry.test.js +5 -16
  2. package/dist/scripts/init-app.d.ts.map +1 -1
  3. package/dist/scripts/init-app.js +2 -2
  4. package/dist/scripts/module-add.d.ts +0 -11
  5. package/dist/scripts/module-add.d.ts.map +1 -1
  6. package/dist/scripts/module-add.js +45 -22
  7. package/dist/scripts/module-build.d.ts.map +1 -1
  8. package/dist/scripts/module-build.js +90 -1
  9. package/dist/scripts/module-create.d.ts +23 -0
  10. package/dist/scripts/module-create.d.ts.map +1 -1
  11. package/dist/scripts/module-create.js +289 -56
  12. package/dist/scripts/module-delete.d.ts +6 -0
  13. package/dist/scripts/module-delete.d.ts.map +1 -0
  14. package/dist/scripts/module-delete.js +143 -0
  15. package/dist/scripts/module-list.d.ts.map +1 -1
  16. package/dist/scripts/module-list.js +2 -2
  17. package/dist/scripts/module-remove.d.ts.map +1 -1
  18. package/dist/scripts/module-remove.js +20 -4
  19. package/dist/styles.css +1 -1
  20. package/dist/templates/DefaultDoc.d.ts.map +1 -1
  21. package/dist/templates/DefaultDoc.js +132 -9
  22. package/dist/templates/DocPage.d.ts.map +1 -1
  23. package/dist/templates/DocPage.js +24 -7
  24. package/package.json +4 -4
  25. package/src/__tests__/module-registry.test.ts +5 -17
  26. package/src/scripts/init-app.ts +5 -2
  27. package/src/scripts/module-add.ts +55 -23
  28. package/src/scripts/module-build.ts +109 -1
  29. package/src/scripts/module-create.ts +392 -69
  30. package/src/scripts/module-delete.ts +202 -0
  31. package/src/scripts/module-list.ts +9 -2
  32. package/src/scripts/module-remove.ts +36 -4
  33. package/src/templates/DefaultDoc.tsx +1121 -424
  34. package/src/templates/DocPage.tsx +26 -10
@@ -28,6 +28,7 @@ import {
28
28
  Link,
29
29
  Blocks,
30
30
  HardDrive,
31
+ RotateCcw,
31
32
  } from "lucide-react";
32
33
  import { DefaultDocumentation } from "./DefaultDoc.js";
33
34
 
@@ -53,8 +54,10 @@ const NavigationListbox: React.FC<NavigationListboxProps> = ({
53
54
  setSelectedModule,
54
55
  }) => (
55
56
  <Listbox
57
+ key={`listbox-${selectedModule}`}
56
58
  aria-label="Navigation"
57
59
  selectionMode="single"
60
+ variant="solid"
58
61
  selectedKeys={selectedModule ? [selectedModule] : []}
59
62
  onSelectionChange={(keys) => {
60
63
  const key = Array.from(keys)[0] as string;
@@ -74,7 +77,7 @@ const NavigationListbox: React.FC<NavigationListboxProps> = ({
74
77
  key={item.id}
75
78
  textValue={item.name}
76
79
  description={item.description}
77
- color={item.color}
80
+ color={"default"}
78
81
  variant="solid"
79
82
  endContent={
80
83
  item.number && (
@@ -83,7 +86,6 @@ const NavigationListbox: React.FC<NavigationListboxProps> = ({
83
86
  </Chip>
84
87
  )
85
88
  }
86
- className={`${selectedModule === item.id ? "bg-default-200/40" : ""}`}
87
89
  startContent={<IconComponent size={18} className="shrink-0" />}
88
90
  >
89
91
  {item.name}
@@ -197,62 +199,78 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
197
199
  name: "Documentation",
198
200
  description: "Accueil",
199
201
  icon: Home,
202
+ color: "default" as const,
200
203
  },
201
204
  {
202
205
  id: "section-welcome",
203
206
  name: "Bienvenue",
204
207
  description: "",
205
208
  icon: Sparkles,
209
+ color: "default" as const,
206
210
  },
207
211
  {
208
212
  id: "section-quickstart",
209
213
  name: "Démarrage rapide",
210
214
  description: "",
211
215
  icon: Rocket,
216
+ color: "default" as const,
212
217
  },
213
218
  {
214
219
  id: "section-architecture",
215
220
  name: "Architecture",
216
221
  description: "",
217
222
  icon: Building2,
223
+ color: "default" as const,
218
224
  },
219
225
  {
220
226
  id: "section-create-module",
221
227
  name: "Créer un module",
222
228
  description: "",
223
229
  icon: Package,
230
+ color: "default" as const,
224
231
  },
225
232
  {
226
233
  id: "section-database",
227
234
  name: "Base de données",
228
235
  description: "",
229
236
  icon: Database,
237
+ color: "default" as const,
230
238
  },
231
239
  {
232
240
  id: "section-storage",
233
241
  name: "Proxy Storage",
234
242
  description: "Gestion des fichiers",
235
243
  icon: HardDrive,
244
+ color: "default" as const,
236
245
  },
237
246
  {
238
247
  id: "section-realtime",
239
248
  name: "Système Realtime",
240
249
  description: "Synchronisation temps réel",
241
- icon: Sparkles,
250
+ icon: RotateCcw,
251
+ color: "default" as const,
242
252
  },
243
253
  {
244
254
  id: "section-ui",
245
255
  name: "Interface utilisateur",
246
256
  description: "",
247
257
  icon: Palette,
258
+ color: "default" as const,
248
259
  },
249
260
  {
250
261
  id: "section-module-docs",
251
262
  name: "Doc des modules",
252
263
  description: "",
253
264
  icon: BookOpen,
265
+ color: "default" as const,
266
+ },
267
+ {
268
+ id: "section-links",
269
+ name: "Liens utiles",
270
+ description: "",
271
+ icon: Link,
272
+ color: "default" as const,
254
273
  },
255
- { id: "section-links", name: "Liens utiles", description: "", icon: Link },
256
274
  ...(modules.length > 0
257
275
  ? [
258
276
  {
@@ -261,6 +279,7 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
261
279
  description: "",
262
280
  icon: Blocks,
263
281
  number: modules.length,
282
+ color: "default" as const,
264
283
  },
265
284
  ]
266
285
  : []),
@@ -272,7 +291,7 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
272
291
  name: m.name,
273
292
  description: m.description,
274
293
  icon: Package,
275
- color: "primary",
294
+ color: "primary" as const,
276
295
  })),
277
296
  ];
278
297
 
@@ -313,13 +332,10 @@ export function DocPage({ modules = [], defaultContent }: DocPageProps) {
313
332
  </DrawerContent>
314
333
  </Drawer>
315
334
 
316
- <div className="flex gap-8">
335
+ <div className="flex gap-4">
317
336
  {/* Desktop Navigation sidebar */}
318
- <aside className="hidden lg:block w-64 shrink-0 sticky top-18 self-start">
337
+ <aside className="hidden lg:block w-72 shrink-0 sticky top-18 self-start">
319
338
  <Card>
320
- <CardHeader className="pb-2">
321
- <h2 className="text-xl font-semibold">Navigation</h2>
322
- </CardHeader>
323
339
  <CardBody>
324
340
  <NavigationListbox
325
341
  navigationItems={navigationItems}