@principal-ai/file-city-react 0.3.0

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 (51) hide show
  1. package/dist/builder/cityDataUtils.d.ts +15 -0
  2. package/dist/builder/cityDataUtils.d.ts.map +1 -0
  3. package/dist/builder/cityDataUtils.js +348 -0
  4. package/dist/components/ArchitectureMapHighlightLayers.d.ts +63 -0
  5. package/dist/components/ArchitectureMapHighlightLayers.d.ts.map +1 -0
  6. package/dist/components/ArchitectureMapHighlightLayers.js +1040 -0
  7. package/dist/components/CityViewWithReactFlow.d.ts +14 -0
  8. package/dist/components/CityViewWithReactFlow.d.ts.map +1 -0
  9. package/dist/components/CityViewWithReactFlow.js +266 -0
  10. package/dist/config/files.json +996 -0
  11. package/dist/hooks/useCodeCityData.d.ts +21 -0
  12. package/dist/hooks/useCodeCityData.d.ts.map +1 -0
  13. package/dist/hooks/useCodeCityData.js +57 -0
  14. package/dist/index.d.ts +14 -0
  15. package/dist/index.d.ts.map +1 -0
  16. package/dist/index.js +29 -0
  17. package/dist/render/client/drawLayeredBuildings.d.ts +51 -0
  18. package/dist/render/client/drawLayeredBuildings.d.ts.map +1 -0
  19. package/dist/render/client/drawLayeredBuildings.js +650 -0
  20. package/dist/stories/ArchitectureMapGridLayout.stories.d.ts +73 -0
  21. package/dist/stories/ArchitectureMapGridLayout.stories.d.ts.map +1 -0
  22. package/dist/stories/ArchitectureMapGridLayout.stories.js +345 -0
  23. package/dist/stories/ArchitectureMapHighlightLayers.stories.d.ts +78 -0
  24. package/dist/stories/ArchitectureMapHighlightLayers.stories.d.ts.map +1 -0
  25. package/dist/stories/ArchitectureMapHighlightLayers.stories.js +270 -0
  26. package/dist/stories/CityViewWithReactFlow.stories.d.ts +24 -0
  27. package/dist/stories/CityViewWithReactFlow.stories.d.ts.map +1 -0
  28. package/dist/stories/CityViewWithReactFlow.stories.js +778 -0
  29. package/dist/stories/sample-data.d.ts +4 -0
  30. package/dist/stories/sample-data.d.ts.map +1 -0
  31. package/dist/stories/sample-data.js +268 -0
  32. package/dist/types/react-types.d.ts +17 -0
  33. package/dist/types/react-types.d.ts.map +1 -0
  34. package/dist/types/react-types.js +4 -0
  35. package/dist/utils/fileColorHighlightLayers.d.ts +86 -0
  36. package/dist/utils/fileColorHighlightLayers.d.ts.map +1 -0
  37. package/dist/utils/fileColorHighlightLayers.js +283 -0
  38. package/package.json +49 -0
  39. package/src/builder/cityDataUtils.ts +430 -0
  40. package/src/components/ArchitectureMapHighlightLayers.tsx +1518 -0
  41. package/src/components/CityViewWithReactFlow.tsx +365 -0
  42. package/src/config/files.json +996 -0
  43. package/src/hooks/useCodeCityData.ts +82 -0
  44. package/src/index.ts +64 -0
  45. package/src/render/client/drawLayeredBuildings.ts +946 -0
  46. package/src/stories/ArchitectureMapGridLayout.stories.tsx +410 -0
  47. package/src/stories/ArchitectureMapHighlightLayers.stories.tsx +312 -0
  48. package/src/stories/CityViewWithReactFlow.stories.tsx +787 -0
  49. package/src/stories/sample-data.ts +301 -0
  50. package/src/types/react-types.ts +18 -0
  51. package/src/utils/fileColorHighlightLayers.ts +378 -0
@@ -0,0 +1,787 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import { CityViewWithReactFlow } from '../components/CityViewWithReactFlow';
3
+ import { FileTree, FileInfo, DirectoryInfo } from '@principal-ai/repository-abstraction';
4
+ import { CodebaseView } from '@principal-ai/alexandria-core-library';
5
+
6
+ const meta = {
7
+ title: 'Components/CityViewWithReactFlow',
8
+ component: CityViewWithReactFlow,
9
+ parameters: {
10
+ layout: 'fullscreen',
11
+ },
12
+ decorators: [
13
+ Story => (
14
+ <div style={{ height: '100vh', width: '100vw' }}>
15
+ <Story />
16
+ </div>
17
+ ),
18
+ ],
19
+ } satisfies Meta<typeof CityViewWithReactFlow>;
20
+
21
+ export default meta;
22
+ type Story = StoryObj<typeof meta>;
23
+
24
+ // Create sample file tree data
25
+ const createSampleFileTree = (): FileTree => ({
26
+ root: {
27
+ name: 'root',
28
+ path: '',
29
+ relativePath: '',
30
+ children: [
31
+ {
32
+ name: 'src',
33
+ path: 'src',
34
+ relativePath: 'src',
35
+ children: [
36
+ {
37
+ name: 'components',
38
+ path: 'src/components',
39
+ relativePath: 'src/components',
40
+ children: [
41
+ {
42
+ name: 'Button.tsx',
43
+ path: 'src/components/Button.tsx',
44
+ relativePath: 'src/components/Button.tsx',
45
+ size: 2500,
46
+ extension: 'tsx',
47
+ lastModified: new Date('2024-01-15'),
48
+ isDirectory: false,
49
+ },
50
+ {
51
+ name: 'Card.tsx',
52
+ path: 'src/components/Card.tsx',
53
+ relativePath: 'src/components/Card.tsx',
54
+ size: 1800,
55
+ extension: 'tsx',
56
+ lastModified: new Date('2024-01-15'),
57
+ isDirectory: false,
58
+ },
59
+ {
60
+ name: 'Modal.tsx',
61
+ path: 'src/components/Modal.tsx',
62
+ relativePath: 'src/components/Modal.tsx',
63
+ size: 3200,
64
+ extension: 'tsx',
65
+ lastModified: new Date('2024-01-15'),
66
+ isDirectory: false,
67
+ },
68
+ ],
69
+ fileCount: 3,
70
+ totalSize: 7500,
71
+ depth: 2,
72
+ },
73
+ {
74
+ name: 'utils',
75
+ path: 'src/utils',
76
+ relativePath: 'src/utils',
77
+ children: [
78
+ {
79
+ name: 'helpers.ts',
80
+ path: 'src/utils/helpers.ts',
81
+ relativePath: 'src/utils/helpers.ts',
82
+ size: 1200,
83
+ extension: 'ts',
84
+ lastModified: new Date('2024-01-10'),
85
+ isDirectory: false,
86
+ },
87
+ {
88
+ name: 'validators.ts',
89
+ path: 'src/utils/validators.ts',
90
+ relativePath: 'src/utils/validators.ts',
91
+ size: 800,
92
+ extension: 'ts',
93
+ lastModified: new Date('2024-01-10'),
94
+ isDirectory: false,
95
+ },
96
+ ],
97
+ fileCount: 2,
98
+ totalSize: 2000,
99
+ depth: 2,
100
+ },
101
+ {
102
+ name: 'index.ts',
103
+ path: 'src/index.ts',
104
+ relativePath: 'src/index.ts',
105
+ size: 500,
106
+ extension: 'ts',
107
+ lastModified: new Date('2024-01-01'),
108
+ isDirectory: false,
109
+ },
110
+ ],
111
+ fileCount: 6,
112
+ totalSize: 10000,
113
+ depth: 1,
114
+ },
115
+ {
116
+ name: 'tests',
117
+ path: 'tests',
118
+ relativePath: 'tests',
119
+ children: [
120
+ {
121
+ name: 'Button.test.tsx',
122
+ path: 'tests/Button.test.tsx',
123
+ relativePath: 'tests/Button.test.tsx',
124
+ size: 1500,
125
+ extension: 'tsx',
126
+ lastModified: new Date('2024-01-20'),
127
+ isDirectory: false,
128
+ },
129
+ {
130
+ name: 'Card.test.tsx',
131
+ path: 'tests/Card.test.tsx',
132
+ relativePath: 'tests/Card.test.tsx',
133
+ size: 1200,
134
+ extension: 'tsx',
135
+ lastModified: new Date('2024-01-20'),
136
+ isDirectory: false,
137
+ },
138
+ ],
139
+ fileCount: 2,
140
+ totalSize: 2700,
141
+ depth: 1,
142
+ },
143
+ {
144
+ name: 'docs',
145
+ path: 'docs',
146
+ relativePath: 'docs',
147
+ children: [
148
+ {
149
+ name: 'README.md',
150
+ path: 'docs/README.md',
151
+ relativePath: 'docs/README.md',
152
+ size: 3000,
153
+ extension: 'md',
154
+ lastModified: new Date('2024-01-01'),
155
+ isDirectory: false,
156
+ },
157
+ {
158
+ name: 'API.md',
159
+ path: 'docs/API.md',
160
+ relativePath: 'docs/API.md',
161
+ size: 2500,
162
+ extension: 'md',
163
+ lastModified: new Date('2024-01-05'),
164
+ isDirectory: false,
165
+ },
166
+ {
167
+ name: 'CONTRIBUTING.md',
168
+ path: 'docs/CONTRIBUTING.md',
169
+ relativePath: 'docs/CONTRIBUTING.md',
170
+ size: 1800,
171
+ extension: 'md',
172
+ lastModified: new Date('2024-01-01'),
173
+ isDirectory: false,
174
+ },
175
+ ],
176
+ fileCount: 3,
177
+ totalSize: 7300,
178
+ depth: 1,
179
+ },
180
+ {
181
+ name: 'config',
182
+ path: 'config',
183
+ relativePath: 'config',
184
+ children: [
185
+ {
186
+ name: 'webpack.config.js',
187
+ path: 'config/webpack.config.js',
188
+ relativePath: 'config/webpack.config.js',
189
+ size: 2200,
190
+ extension: 'js',
191
+ lastModified: new Date('2024-01-01'),
192
+ isDirectory: false,
193
+ },
194
+ {
195
+ name: 'tsconfig.json',
196
+ path: 'config/tsconfig.json',
197
+ relativePath: 'config/tsconfig.json',
198
+ size: 800,
199
+ extension: 'json',
200
+ lastModified: new Date('2024-01-01'),
201
+ isDirectory: false,
202
+ },
203
+ ],
204
+ fileCount: 2,
205
+ totalSize: 3000,
206
+ depth: 1,
207
+ },
208
+ {
209
+ name: 'package.json',
210
+ path: 'package.json',
211
+ relativePath: 'package.json',
212
+ size: 1500,
213
+ extension: 'json',
214
+ lastModified: new Date('2024-01-01'),
215
+ isDirectory: false,
216
+ },
217
+ ],
218
+ fileCount: 14,
219
+ totalSize: 24500,
220
+ depth: 0,
221
+ },
222
+ stats: {
223
+ totalFiles: 14,
224
+ totalDirectories: 6,
225
+ totalSize: 24500,
226
+ maxDepth: 3,
227
+ },
228
+ allFiles: (function () {
229
+ const files: FileInfo[] = [];
230
+ const collectFiles = (node: DirectoryInfo | FileInfo) => {
231
+ if (!('children' in node)) {
232
+ files.push(node as FileInfo);
233
+ } else if (node.children) {
234
+ for (const child of node.children) {
235
+ collectFiles(child);
236
+ }
237
+ }
238
+ };
239
+ const root = {
240
+ name: 'root',
241
+ path: '',
242
+ relativePath: '',
243
+ children: [
244
+ {
245
+ name: 'src',
246
+ path: 'src',
247
+ relativePath: 'src',
248
+ children: [
249
+ {
250
+ name: 'components',
251
+ path: 'src/components',
252
+ relativePath: 'src/components',
253
+ children: [
254
+ {
255
+ name: 'Button.tsx',
256
+ path: 'src/components/Button.tsx',
257
+ relativePath: 'src/components/Button.tsx',
258
+ size: 2500,
259
+ extension: 'tsx',
260
+ lastModified: new Date('2024-01-15'),
261
+ isDirectory: false,
262
+ },
263
+ {
264
+ name: 'Card.tsx',
265
+ path: 'src/components/Card.tsx',
266
+ relativePath: 'src/components/Card.tsx',
267
+ size: 1800,
268
+ extension: 'tsx',
269
+ lastModified: new Date('2024-01-15'),
270
+ isDirectory: false,
271
+ },
272
+ {
273
+ name: 'Modal.tsx',
274
+ path: 'src/components/Modal.tsx',
275
+ relativePath: 'src/components/Modal.tsx',
276
+ size: 3200,
277
+ extension: 'tsx',
278
+ lastModified: new Date('2024-01-15'),
279
+ isDirectory: false,
280
+ },
281
+ ],
282
+ fileCount: 3,
283
+ totalSize: 7500,
284
+ depth: 2,
285
+ },
286
+ {
287
+ name: 'utils',
288
+ path: 'src/utils',
289
+ relativePath: 'src/utils',
290
+ children: [
291
+ {
292
+ name: 'helpers.ts',
293
+ path: 'src/utils/helpers.ts',
294
+ relativePath: 'src/utils/helpers.ts',
295
+ size: 1200,
296
+ extension: 'ts',
297
+ lastModified: new Date('2024-01-10'),
298
+ isDirectory: false,
299
+ },
300
+ {
301
+ name: 'validators.ts',
302
+ path: 'src/utils/validators.ts',
303
+ relativePath: 'src/utils/validators.ts',
304
+ size: 800,
305
+ extension: 'ts',
306
+ lastModified: new Date('2024-01-10'),
307
+ isDirectory: false,
308
+ },
309
+ ],
310
+ fileCount: 2,
311
+ totalSize: 2000,
312
+ depth: 2,
313
+ },
314
+ {
315
+ name: 'index.ts',
316
+ path: 'src/index.ts',
317
+ relativePath: 'src/index.ts',
318
+ size: 500,
319
+ extension: 'ts',
320
+ lastModified: new Date('2024-01-01'),
321
+ isDirectory: false,
322
+ },
323
+ ],
324
+ fileCount: 6,
325
+ totalSize: 10000,
326
+ depth: 1,
327
+ },
328
+ {
329
+ name: 'tests',
330
+ path: 'tests',
331
+ relativePath: 'tests',
332
+ children: [
333
+ {
334
+ name: 'Button.test.tsx',
335
+ path: 'tests/Button.test.tsx',
336
+ relativePath: 'tests/Button.test.tsx',
337
+ size: 1500,
338
+ extension: 'tsx',
339
+ lastModified: new Date('2024-01-20'),
340
+ isDirectory: false,
341
+ },
342
+ {
343
+ name: 'Card.test.tsx',
344
+ path: 'tests/Card.test.tsx',
345
+ relativePath: 'tests/Card.test.tsx',
346
+ size: 1200,
347
+ extension: 'tsx',
348
+ lastModified: new Date('2024-01-20'),
349
+ isDirectory: false,
350
+ },
351
+ ],
352
+ fileCount: 2,
353
+ totalSize: 2700,
354
+ depth: 1,
355
+ },
356
+ {
357
+ name: 'docs',
358
+ path: 'docs',
359
+ relativePath: 'docs',
360
+ children: [
361
+ {
362
+ name: 'README.md',
363
+ path: 'docs/README.md',
364
+ relativePath: 'docs/README.md',
365
+ size: 3000,
366
+ extension: 'md',
367
+ lastModified: new Date('2024-01-01'),
368
+ isDirectory: false,
369
+ },
370
+ {
371
+ name: 'API.md',
372
+ path: 'docs/API.md',
373
+ relativePath: 'docs/API.md',
374
+ size: 2500,
375
+ extension: 'md',
376
+ lastModified: new Date('2024-01-05'),
377
+ isDirectory: false,
378
+ },
379
+ {
380
+ name: 'CONTRIBUTING.md',
381
+ path: 'docs/CONTRIBUTING.md',
382
+ relativePath: 'docs/CONTRIBUTING.md',
383
+ size: 1800,
384
+ extension: 'md',
385
+ lastModified: new Date('2024-01-01'),
386
+ isDirectory: false,
387
+ },
388
+ ],
389
+ fileCount: 3,
390
+ totalSize: 7300,
391
+ depth: 1,
392
+ },
393
+ {
394
+ name: 'config',
395
+ path: 'config',
396
+ relativePath: 'config',
397
+ children: [
398
+ {
399
+ name: 'webpack.config.js',
400
+ path: 'config/webpack.config.js',
401
+ relativePath: 'config/webpack.config.js',
402
+ size: 2200,
403
+ extension: 'js',
404
+ lastModified: new Date('2024-01-01'),
405
+ isDirectory: false,
406
+ },
407
+ {
408
+ name: 'tsconfig.json',
409
+ path: 'config/tsconfig.json',
410
+ relativePath: 'config/tsconfig.json',
411
+ size: 800,
412
+ extension: 'json',
413
+ lastModified: new Date('2024-01-01'),
414
+ isDirectory: false,
415
+ },
416
+ ],
417
+ fileCount: 2,
418
+ totalSize: 3000,
419
+ depth: 1,
420
+ },
421
+ {
422
+ name: 'package.json',
423
+ path: 'package.json',
424
+ relativePath: 'package.json',
425
+ size: 1500,
426
+ extension: 'json',
427
+ lastModified: new Date('2024-01-01'),
428
+ isDirectory: false,
429
+ },
430
+ ],
431
+ fileCount: 14,
432
+ totalSize: 24500,
433
+ depth: 0,
434
+ };
435
+ collectFiles(root);
436
+ return files;
437
+ })(),
438
+ allDirectories: (function () {
439
+ const dirs: DirectoryInfo[] = [];
440
+ const collectDirs = (node: DirectoryInfo | FileInfo) => {
441
+ if ('children' in node) {
442
+ dirs.push(node as DirectoryInfo);
443
+ if (node.children) {
444
+ for (const child of node.children) {
445
+ collectDirs(child);
446
+ }
447
+ }
448
+ }
449
+ };
450
+ const root = {
451
+ name: 'root',
452
+ path: '',
453
+ relativePath: '',
454
+ children: [
455
+ {
456
+ name: 'src',
457
+ path: 'src',
458
+ relativePath: 'src',
459
+ children: [
460
+ {
461
+ name: 'components',
462
+ path: 'src/components',
463
+ relativePath: 'src/components',
464
+ children: [
465
+ {
466
+ name: 'Button.tsx',
467
+ path: 'src/components/Button.tsx',
468
+ relativePath: 'src/components/Button.tsx',
469
+ size: 2500,
470
+ extension: 'tsx',
471
+ lastModified: new Date('2024-01-15'),
472
+ isDirectory: false,
473
+ },
474
+ {
475
+ name: 'Card.tsx',
476
+ path: 'src/components/Card.tsx',
477
+ relativePath: 'src/components/Card.tsx',
478
+ size: 1800,
479
+ extension: 'tsx',
480
+ lastModified: new Date('2024-01-15'),
481
+ isDirectory: false,
482
+ },
483
+ {
484
+ name: 'Modal.tsx',
485
+ path: 'src/components/Modal.tsx',
486
+ relativePath: 'src/components/Modal.tsx',
487
+ size: 3200,
488
+ extension: 'tsx',
489
+ lastModified: new Date('2024-01-15'),
490
+ isDirectory: false,
491
+ },
492
+ ],
493
+ fileCount: 3,
494
+ totalSize: 7500,
495
+ depth: 2,
496
+ },
497
+ {
498
+ name: 'utils',
499
+ path: 'src/utils',
500
+ relativePath: 'src/utils',
501
+ children: [
502
+ {
503
+ name: 'helpers.ts',
504
+ path: 'src/utils/helpers.ts',
505
+ relativePath: 'src/utils/helpers.ts',
506
+ size: 1200,
507
+ extension: 'ts',
508
+ lastModified: new Date('2024-01-10'),
509
+ isDirectory: false,
510
+ },
511
+ {
512
+ name: 'validators.ts',
513
+ path: 'src/utils/validators.ts',
514
+ relativePath: 'src/utils/validators.ts',
515
+ size: 800,
516
+ extension: 'ts',
517
+ lastModified: new Date('2024-01-10'),
518
+ isDirectory: false,
519
+ },
520
+ ],
521
+ fileCount: 2,
522
+ totalSize: 2000,
523
+ depth: 2,
524
+ },
525
+ {
526
+ name: 'index.ts',
527
+ path: 'src/index.ts',
528
+ relativePath: 'src/index.ts',
529
+ size: 500,
530
+ extension: 'ts',
531
+ lastModified: new Date('2024-01-01'),
532
+ isDirectory: false,
533
+ },
534
+ ],
535
+ fileCount: 6,
536
+ totalSize: 10000,
537
+ depth: 1,
538
+ },
539
+ {
540
+ name: 'tests',
541
+ path: 'tests',
542
+ relativePath: 'tests',
543
+ children: [
544
+ {
545
+ name: 'Button.test.tsx',
546
+ path: 'tests/Button.test.tsx',
547
+ relativePath: 'tests/Button.test.tsx',
548
+ size: 1500,
549
+ extension: 'tsx',
550
+ lastModified: new Date('2024-01-20'),
551
+ isDirectory: false,
552
+ },
553
+ {
554
+ name: 'Card.test.tsx',
555
+ path: 'tests/Card.test.tsx',
556
+ relativePath: 'tests/Card.test.tsx',
557
+ size: 1200,
558
+ extension: 'tsx',
559
+ lastModified: new Date('2024-01-20'),
560
+ isDirectory: false,
561
+ },
562
+ ],
563
+ fileCount: 2,
564
+ totalSize: 2700,
565
+ depth: 1,
566
+ },
567
+ {
568
+ name: 'docs',
569
+ path: 'docs',
570
+ relativePath: 'docs',
571
+ children: [
572
+ {
573
+ name: 'README.md',
574
+ path: 'docs/README.md',
575
+ relativePath: 'docs/README.md',
576
+ size: 3000,
577
+ extension: 'md',
578
+ lastModified: new Date('2024-01-01'),
579
+ isDirectory: false,
580
+ },
581
+ {
582
+ name: 'API.md',
583
+ path: 'docs/API.md',
584
+ relativePath: 'docs/API.md',
585
+ size: 2500,
586
+ extension: 'md',
587
+ lastModified: new Date('2024-01-05'),
588
+ isDirectory: false,
589
+ },
590
+ {
591
+ name: 'CONTRIBUTING.md',
592
+ path: 'docs/CONTRIBUTING.md',
593
+ relativePath: 'docs/CONTRIBUTING.md',
594
+ size: 1800,
595
+ extension: 'md',
596
+ lastModified: new Date('2024-01-01'),
597
+ isDirectory: false,
598
+ },
599
+ ],
600
+ fileCount: 3,
601
+ totalSize: 7300,
602
+ depth: 1,
603
+ },
604
+ {
605
+ name: 'config',
606
+ path: 'config',
607
+ relativePath: 'config',
608
+ children: [
609
+ {
610
+ name: 'webpack.config.js',
611
+ path: 'config/webpack.config.js',
612
+ relativePath: 'config/webpack.config.js',
613
+ size: 2200,
614
+ extension: 'js',
615
+ lastModified: new Date('2024-01-01'),
616
+ isDirectory: false,
617
+ },
618
+ {
619
+ name: 'tsconfig.json',
620
+ path: 'config/tsconfig.json',
621
+ relativePath: 'config/tsconfig.json',
622
+ size: 800,
623
+ extension: 'json',
624
+ lastModified: new Date('2024-01-01'),
625
+ isDirectory: false,
626
+ },
627
+ ],
628
+ fileCount: 2,
629
+ totalSize: 3000,
630
+ depth: 1,
631
+ },
632
+ {
633
+ name: 'package.json',
634
+ path: 'package.json',
635
+ relativePath: 'package.json',
636
+ size: 1500,
637
+ extension: 'json',
638
+ lastModified: new Date('2024-01-01'),
639
+ isDirectory: false,
640
+ },
641
+ ],
642
+ fileCount: 14,
643
+ totalSize: 24500,
644
+ depth: 0,
645
+ };
646
+ collectDirs(root);
647
+ return dirs;
648
+ })(),
649
+ sha: 'sample-sha',
650
+ metadata: {
651
+ id: 'sample-tree',
652
+ timestamp: new Date(),
653
+ sourceType: 'sample',
654
+ sourceInfo: {},
655
+ },
656
+ });
657
+
658
+ export const SingleCell: Story = {
659
+ args: {
660
+ fileTree: createSampleFileTree(),
661
+ gridConfig: {
662
+ id: 'single-cell',
663
+ version: '1.0',
664
+ name: 'Single Cell',
665
+ description: 'All files in one cell',
666
+ overviewPath: 'README.md',
667
+ category: 'custom',
668
+ displayOrder: 0,
669
+ referenceGroups: {
670
+ 'All Files': {
671
+ files: ['src', 'tests', 'docs', 'config', 'package.json'],
672
+ coordinates: [0, 0],
673
+ },
674
+ },
675
+ metadata: {
676
+ ui: {
677
+ enabled: true,
678
+ rows: 1,
679
+ cols: 1,
680
+ },
681
+ },
682
+ } as CodebaseView,
683
+ onCellClick: () => {},
684
+ },
685
+ };
686
+
687
+ export const MultiCell: Story = {
688
+ args: {
689
+ fileTree: createSampleFileTree(),
690
+ gridConfig: {
691
+ id: 'multi-cell',
692
+ version: '1.0',
693
+ name: 'Multi-Cell Layout',
694
+ description: 'Organized grid layout',
695
+ overviewPath: 'README.md',
696
+ category: 'custom',
697
+ displayOrder: 0,
698
+ referenceGroups: {
699
+ 'Source Code': {
700
+ files: ['src'],
701
+ coordinates: [0, 0],
702
+ },
703
+ Tests: {
704
+ files: ['tests'],
705
+ coordinates: [0, 1],
706
+ },
707
+ Documentation: {
708
+ files: ['docs'],
709
+ coordinates: [1, 0],
710
+ },
711
+ Configuration: {
712
+ files: ['config', 'package.json'],
713
+ coordinates: [1, 1],
714
+ },
715
+ },
716
+ metadata: {
717
+ ui: {
718
+ enabled: true,
719
+ rows: 2,
720
+ cols: 2,
721
+ },
722
+ },
723
+ } as CodebaseView,
724
+ onCellClick: () => {},
725
+ },
726
+ };
727
+
728
+ export const LargeGrid: Story = {
729
+ args: {
730
+ fileTree: createSampleFileTree(),
731
+ gridConfig: {
732
+ id: 'large-grid',
733
+ version: '1.0',
734
+ name: 'Large Grid Layout',
735
+ description: '3x3 grid layout',
736
+ overviewPath: 'README.md',
737
+ category: 'custom',
738
+ displayOrder: 0,
739
+ referenceGroups: {
740
+ Components: {
741
+ files: ['src/components/**/*'],
742
+ coordinates: [0, 0],
743
+ },
744
+ Utils: {
745
+ files: ['src/utils/**/*'],
746
+ coordinates: [0, 1],
747
+ },
748
+ Core: {
749
+ files: ['src/index.ts'],
750
+ coordinates: [0, 2],
751
+ },
752
+ 'Unit Tests': {
753
+ files: ['tests/**/*.test.*'],
754
+ coordinates: [1, 0],
755
+ },
756
+ Documentation: {
757
+ files: ['docs/**/*'],
758
+ coordinates: [1, 1],
759
+ },
760
+ Config: {
761
+ files: ['config/**/*'],
762
+ coordinates: [1, 2],
763
+ },
764
+ Package: {
765
+ files: ['package.json'],
766
+ coordinates: [2, 0],
767
+ },
768
+ Other: {
769
+ files: ['*'],
770
+ coordinates: [2, 1],
771
+ },
772
+ Empty: {
773
+ files: [],
774
+ coordinates: [2, 2],
775
+ },
776
+ },
777
+ metadata: {
778
+ ui: {
779
+ enabled: true,
780
+ rows: 3,
781
+ cols: 3,
782
+ },
783
+ },
784
+ } as CodebaseView,
785
+ onCellClick: () => {},
786
+ },
787
+ };