project-compass 1.0.4 → 1.0.6

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/cli.js +15 -8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "project-compass",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Ink-based project explorer that detects local repos and lets you build/test/run them without memorizing commands.",
5
5
  "main": "src/cli.js",
6
6
  "type": "module",
package/src/cli.js CHANGED
@@ -773,6 +773,9 @@ const ART_CHARS = ['▁', '▃', '▄', '▅', '▇'];
773
773
  const ART_COLORS = ['magenta', 'blue', 'cyan', 'yellow', 'red'];
774
774
  const OUTPUT_WINDOW_SIZE = 10;
775
775
  const OUTPUT_WINDOW_HEIGHT = OUTPUT_WINDOW_SIZE + 2;
776
+ const PROJECTS_MIN_WIDTH = 32;
777
+ const DETAILS_MIN_WIDTH = 44;
778
+ const HELP_CARD_MIN_WIDTH = 30;
776
779
  const RECENT_RUN_LIMIT = 5;
777
780
 
778
781
  function useScanner(rootPath) {
@@ -1247,7 +1250,7 @@ function Compass({rootPath}) {
1247
1250
 
1248
1251
  const helpSection = create(
1249
1252
  Box,
1250
- {marginTop: 1, flexDirection: 'row', justifyContent: 'space-between'},
1253
+ {marginTop: 1, flexDirection: 'row', justifyContent: 'space-between', flexWrap: 'wrap'},
1251
1254
  ...helpCards.map((card, index) =>
1252
1255
  create(
1253
1256
  Box,
@@ -1255,7 +1258,9 @@ function Compass({rootPath}) {
1255
1258
  key: card.label,
1256
1259
  flexGrow: 1,
1257
1260
  flexBasis: 0,
1261
+ minWidth: HELP_CARD_MIN_WIDTH,
1258
1262
  marginRight: index < helpCards.length - 1 ? 1 : 0,
1263
+ marginBottom: 1,
1259
1264
  borderStyle: 'round',
1260
1265
  borderColor: card.color,
1261
1266
  padding: 1
@@ -1313,17 +1318,18 @@ function Compass({rootPath}) {
1313
1318
  artBoard,
1314
1319
  create(
1315
1320
  Box,
1316
- {marginTop: 1, flexDirection: 'row', alignItems: 'stretch'},
1321
+ {marginTop: 1, flexDirection: 'row', alignItems: 'stretch', width: '100%', flexWrap: 'wrap'},
1317
1322
  create(
1318
1323
  Box,
1319
1324
  {
1320
- flex: 1,
1325
+ flexGrow: 1,
1321
1326
  flexBasis: 0,
1327
+ flexShrink: 1,
1328
+ minWidth: PROJECTS_MIN_WIDTH,
1322
1329
  marginRight: 1,
1323
1330
  borderStyle: 'round',
1324
1331
  borderColor: 'magenta',
1325
- padding: 1,
1326
- minWidth: 0
1332
+ padding: 1
1327
1333
  },
1328
1334
  create(Text, {bold: true, color: 'magenta'}, 'Projects'),
1329
1335
  create(Box, {flexDirection: 'column', marginTop: 1}, ...projectRows)
@@ -1331,12 +1337,13 @@ function Compass({rootPath}) {
1331
1337
  create(
1332
1338
  Box,
1333
1339
  {
1334
- flex: 1,
1340
+ flexGrow: 1.3,
1335
1341
  flexBasis: 0,
1342
+ flexShrink: 1,
1343
+ minWidth: DETAILS_MIN_WIDTH,
1336
1344
  borderStyle: 'round',
1337
1345
  borderColor: 'cyan',
1338
- padding: 1,
1339
- minWidth: 0
1346
+ padding: 1
1340
1347
  },
1341
1348
  create(Text, {bold: true, color: 'cyan'}, 'Details'),
1342
1349
  ...detailContent