tycono 0.1.96 → 0.1.97
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/package.json +1 -1
- package/src/tui/components/PanelMode.tsx +11 -13
package/package.json
CHANGED
|
@@ -462,28 +462,26 @@ export const PanelMode: React.FC<PanelModeProps> = ({
|
|
|
462
462
|
</Box>
|
|
463
463
|
) : (
|
|
464
464
|
<Box flexGrow={1} flexDirection="column">
|
|
465
|
-
{
|
|
466
|
-
|
|
465
|
+
{docsScroll === 0 ? (
|
|
466
|
+
/* File list — only render visible window (prevent Yoga OOM on 600+ files) */
|
|
467
467
|
<Box flexDirection="column" marginTop={0}>
|
|
468
|
-
{docsList.
|
|
468
|
+
<Text color="gray" dimColor>{docsList.length} files{docsIndex > 0 ? ` (${docsIndex + 1}/${docsList.length})` : ''}</Text>
|
|
469
|
+
{docsList.slice(docsIndex, docsIndex + termHeight - 10).map((doc, i) => (
|
|
469
470
|
<Box key={doc.path}>
|
|
470
471
|
<Text
|
|
471
|
-
color={i ===
|
|
472
|
-
bold={i ===
|
|
473
|
-
inverse={i ===
|
|
472
|
+
color={i === 0 ? 'cyan' : doc.isWave ? 'green' : 'white'}
|
|
473
|
+
bold={i === 0}
|
|
474
|
+
inverse={i === 0}
|
|
474
475
|
>
|
|
475
|
-
{doc.isWave ? '\u2605' : ' '} {doc.title.slice(0,
|
|
476
|
+
{doc.isWave ? '\u2605' : ' '} {doc.title.slice(0, 55)}
|
|
476
477
|
</Text>
|
|
477
478
|
</Box>
|
|
478
479
|
))}
|
|
479
|
-
{docsList.length > termHeight - 8 && (
|
|
480
|
-
<Text color="gray"> ... +{docsList.length - (termHeight - 8)} more (Tab to cycle)</Text>
|
|
481
|
-
)}
|
|
482
480
|
</Box>
|
|
483
481
|
) : (
|
|
484
|
-
/* File preview
|
|
482
|
+
/* File preview */
|
|
485
483
|
<Box flexDirection="column">
|
|
486
|
-
<Text color="cyan" bold>{selectedDoc
|
|
484
|
+
<Text color="cyan" bold>{selectedDoc?.isWave ? '\u2605 ' : ''}{selectedDoc?.path.split('/').slice(-2).join('/')}</Text>
|
|
487
485
|
<Text color="gray">{'\u2500'.repeat(50)}</Text>
|
|
488
486
|
{filePreview.slice(docsScroll - 1, docsScroll - 1 + termHeight - 10).map((line, i) => (
|
|
489
487
|
<Text key={i} color="white" wrap="wrap">{line}</Text>
|
|
@@ -493,7 +491,7 @@ export const PanelMode: React.FC<PanelModeProps> = ({
|
|
|
493
491
|
|
|
494
492
|
<Box marginTop={0}>
|
|
495
493
|
<Text color="gray" dimColor>
|
|
496
|
-
[Enter] {process.env.EDITOR || 'vim'} | [
|
|
494
|
+
[Enter] {process.env.EDITOR || 'vim'} | [j/k] {docsScroll > 0 ? 'scroll' : 'select'}
|
|
497
495
|
</Text>
|
|
498
496
|
</Box>
|
|
499
497
|
</Box>
|