servicemap 0.1.11 → 0.1.12

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.
@@ -352,8 +352,8 @@ function runTargetSurvey() {
352
352
  renderSurvey(selected, cursor);
353
353
 
354
354
  const onKeypress = (_str, key) => {
355
- if (key.name === 'up') cursor = (cursor - 1 + targetCatalog.length) % targetCatalog.length;
356
- if (key.name === 'down') cursor = (cursor + 1) % targetCatalog.length;
355
+ if (key.name === 'up') cursor = Math.max(0, cursor - 1);
356
+ if (key.name === 'down') cursor = Math.min(targetCatalog.length - 1, cursor + 1);
357
357
  if (key.name === 'space') {
358
358
  const id = targetCatalog[cursor].id;
359
359
  if (selected.has(id)) selected.delete(id);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "servicemap",
3
- "version": "0.1.11",
3
+ "version": "0.1.12",
4
4
  "description": "Generate an internal service map page or desktop app for a software project.",
5
5
  "type": "module",
6
6
  "bin": {