scripter-x 1.0.1 → 1.0.2

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scripter-x",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "ScripterX — local Flipkart session extractor (runs on your residential IP, syncs to marthunt)",
5
5
  "type": "module",
6
6
  "bin": {
package/src/ui/App.js CHANGED
@@ -8,7 +8,7 @@
8
8
  // 'output' → scrollback lines a command printed (tables, results)
9
9
  import React, { useState, useEffect, useRef } from 'react';
10
10
  import { Box, Text, useApp } from 'ink';
11
- import { Shell } from './Shell.js';
11
+ import { Shell, WelcomeBox } from './Shell.js';
12
12
  import { SelectList, Confirm, TextField } from './components.js';
13
13
  import { RunView } from './RunView.js';
14
14
  import { COLORS } from '../theme.js';
@@ -81,12 +81,17 @@ export function App({ ctx }) {
81
81
  }
82
82
  }
83
83
 
84
- // scrollback (map semantic color names → theme hexes)
84
+ // scrollback (map semantic color names → theme hexes). Show only the most recent lines
85
+ // that fit, so output grows DOWNWARD toward the prompt instead of pushing it off-screen.
85
86
  const colorMap = { accent: COLORS.accent, danger: COLORS.danger, success: COLORS.success, warn: COLORS.warn };
87
+ const visibleLines = lines.slice(-200);
86
88
  const scroll = h(Box, { flexDirection: 'column' },
87
- lines.map((l, i) => h(Text, { key: i, color: colorMap[l.color] || l.color || undefined }, l.text)));
89
+ visibleLines.map((l, i) => h(Text, { key: i, color: colorMap[l.color] || l.color || undefined }, l.text)));
88
90
 
91
+ // Layout (top → bottom): banner · output · prompt/palette. So command output appears
92
+ // BELOW the banner and ABOVE the prompt — never above the banner.
89
93
  return h(Box, { flexDirection: 'column', ref: frameRef },
94
+ h(WelcomeBox, { username: me.username, server: me.server, frameRef, onLogout: () => runCommand('logout') }),
90
95
  scroll,
91
96
  screen === 'run' && runController ? h(RunView, { controller: runController, embedded: true }) : null,
92
97
  screen === 'prompts' && prompt ? h(PromptView, { prompt, frameRef }) : null,
package/src/ui/Shell.js CHANGED
@@ -28,7 +28,7 @@ export const COMMANDS = [
28
28
  { name: 'exit', desc: 'quit ScripterX' },
29
29
  ];
30
30
 
31
- function WelcomeBox({ username, server, frameRef, onLogout }) {
31
+ export function WelcomeBox({ username, server, frameRef, onLogout }) {
32
32
  const logo = logoLines();
33
33
  return h(Box, { borderStyle: 'round', borderColor: COLORS.accent, paddingX: 2, paddingY: 1, flexDirection: 'column' },
34
34
  // ASCII wordmark with a top→bottom gradient
@@ -127,9 +127,10 @@ export function Shell({ username, server, onRun, busy, frameRef }) {
127
127
  onRun(name);
128
128
  }
129
129
 
130
+ // NOTE: the welcome banner is rendered by App at the TOP; Shell renders only the
131
+ // prompt + palette so they sit BELOW the command output.
130
132
  return h(Box, { flexDirection: 'column' },
131
- h(WelcomeBox, { username, server, frameRef, onLogout: () => run('logout') }),
132
- h(Box, { marginTop: 1 },
133
+ h(Box, null,
133
134
  h(Text, { color: COLORS.accent }, '› '),
134
135
  h(Text, null, query || ''),
135
136
  busy ? h(Text, { color: 'gray' }, ' …') : h(Text, { color: COLORS.accent }, '▏')),