@principal-ai/file-city-react 0.5.34 → 0.5.36
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/components/FileCity3D/FileCity3D.d.ts +3 -26
- package/dist/components/FileCity3D/FileCity3D.d.ts.map +1 -1
- package/dist/components/FileCity3D/FileCity3D.js +278 -191
- package/dist/components/FileCity3D/index.d.ts +1 -1
- package/dist/components/FileCity3D/index.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/FileCity3D/FileCity3D.tsx +402 -232
- package/src/components/FileCity3D/index.ts +2 -1
- package/src/index.ts +0 -2
- package/src/stories/2D3DComparison.stories.tsx +2 -2
- package/src/stories/FileCity3D.stories.tsx +65 -6
package/src/index.ts
CHANGED
|
@@ -201,7 +201,7 @@ export const SideBySide: StoryObj = {
|
|
|
201
201
|
fontWeight: 500,
|
|
202
202
|
}}
|
|
203
203
|
>
|
|
204
|
-
3D FLAT
|
|
204
|
+
3D FLAT (with test border)
|
|
205
205
|
</div>
|
|
206
206
|
<div style={{ flex: 1, backgroundColor: '#0f1419' }}>
|
|
207
207
|
<FileCity3D
|
|
@@ -210,7 +210,7 @@ export const SideBySide: StoryObj = {
|
|
|
210
210
|
width="100%"
|
|
211
211
|
height="100%"
|
|
212
212
|
isGrown={false}
|
|
213
|
-
showControls={
|
|
213
|
+
showControls={true}
|
|
214
214
|
backgroundColor="#0f1419"
|
|
215
215
|
/>
|
|
216
216
|
</div>
|
|
@@ -422,7 +422,7 @@ export const IsolationTransparent: Story = {
|
|
|
422
422
|
name: 'Focus Layer',
|
|
423
423
|
enabled: true,
|
|
424
424
|
color: '#22c55e',
|
|
425
|
-
items: [{ path: 'src', type: 'directory' as const }],
|
|
425
|
+
items: [{ path: 'src', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
426
426
|
},
|
|
427
427
|
],
|
|
428
428
|
},
|
|
@@ -442,7 +442,7 @@ export const IsolationCollapse: Story = {
|
|
|
442
442
|
name: 'Focus Layer',
|
|
443
443
|
enabled: true,
|
|
444
444
|
color: '#3b82f6',
|
|
445
|
-
items: [{ path: 'src/components', type: 'directory' as const }],
|
|
445
|
+
items: [{ path: 'src/components', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
446
446
|
},
|
|
447
447
|
],
|
|
448
448
|
},
|
|
@@ -462,7 +462,7 @@ export const IsolationHide: Story = {
|
|
|
462
462
|
name: 'Focus Layer',
|
|
463
463
|
enabled: true,
|
|
464
464
|
color: '#f59e0b',
|
|
465
|
-
items: [{ path: 'tests', type: 'directory' as const }],
|
|
465
|
+
items: [{ path: 'tests', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
466
466
|
},
|
|
467
467
|
],
|
|
468
468
|
},
|
|
@@ -483,14 +483,73 @@ export const MultipleHighlights: Story = {
|
|
|
483
483
|
name: 'Source',
|
|
484
484
|
enabled: true,
|
|
485
485
|
color: '#22c55e',
|
|
486
|
-
items: [{ path: 'src', type: 'directory' as const }],
|
|
486
|
+
items: [{ path: 'src', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
487
487
|
},
|
|
488
488
|
{
|
|
489
489
|
id: 'tests',
|
|
490
490
|
name: 'Tests',
|
|
491
491
|
enabled: true,
|
|
492
492
|
color: '#ef4444',
|
|
493
|
-
items: [{ path: 'tests', type: 'directory' as const }],
|
|
493
|
+
items: [{ path: 'tests', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
494
|
+
},
|
|
495
|
+
],
|
|
496
|
+
},
|
|
497
|
+
};
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* Layered Highlights - Multiple overlapping highlight layers
|
|
501
|
+
* Tests priority-based rendering with fill + border strategies
|
|
502
|
+
* Starts flat (2D) - click "Grow" button to see in 3D
|
|
503
|
+
*/
|
|
504
|
+
export const LayeredHighlights: Story = {
|
|
505
|
+
args: {
|
|
506
|
+
cityData: sampleCityData,
|
|
507
|
+
height: '100vh',
|
|
508
|
+
isolationMode: 'transparent',
|
|
509
|
+
dimOpacity: 0.05,
|
|
510
|
+
animation: {
|
|
511
|
+
startFlat: true,
|
|
512
|
+
autoStartDelay: null, // Stay in 2D, use button to grow
|
|
513
|
+
},
|
|
514
|
+
showControls: true,
|
|
515
|
+
highlightLayers: [
|
|
516
|
+
{
|
|
517
|
+
id: 'base-fill',
|
|
518
|
+
name: 'Base Fill (src)',
|
|
519
|
+
enabled: true,
|
|
520
|
+
color: '#3b82f6',
|
|
521
|
+
opacity: 0.7,
|
|
522
|
+
priority: 1,
|
|
523
|
+
items: [{ path: 'src', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
id: 'components-fill',
|
|
527
|
+
name: 'Components Fill (src/components)',
|
|
528
|
+
enabled: true,
|
|
529
|
+
color: '#facc15',
|
|
530
|
+
opacity: 1.0,
|
|
531
|
+
priority: 2,
|
|
532
|
+
items: [{ path: 'src/components', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
id: 'components-border',
|
|
536
|
+
name: 'Components Border (src/components)',
|
|
537
|
+
enabled: true,
|
|
538
|
+
color: '#ef4444',
|
|
539
|
+
opacity: 1.0,
|
|
540
|
+
priority: 3,
|
|
541
|
+
borderWidth: 6,
|
|
542
|
+
items: [{ path: 'src/components', type: 'directory' as const, renderStrategy: 'border' as const }],
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
id: 'utils-border',
|
|
546
|
+
name: 'Utils Border (src/utils)',
|
|
547
|
+
enabled: true,
|
|
548
|
+
color: '#22c55e',
|
|
549
|
+
opacity: 1.0,
|
|
550
|
+
priority: 4,
|
|
551
|
+
borderWidth: 4,
|
|
552
|
+
items: [{ path: 'src/utils', type: 'directory' as const, renderStrategy: 'border' as const }],
|
|
494
553
|
},
|
|
495
554
|
],
|
|
496
555
|
},
|
|
@@ -516,7 +575,7 @@ export const AnimatedWithHighlight: Story = {
|
|
|
516
575
|
name: 'Components',
|
|
517
576
|
enabled: true,
|
|
518
577
|
color: '#8b5cf6',
|
|
519
|
-
items: [{ path: 'src/components', type: 'directory' as const }],
|
|
578
|
+
items: [{ path: 'src/components', type: 'directory' as const, renderStrategy: 'fill' as const }],
|
|
520
579
|
},
|
|
521
580
|
],
|
|
522
581
|
},
|