voonex 0.3.0 → 0.3.1

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.
@@ -104,10 +104,6 @@ class InputField {
104
104
  // Clamp scrollOffset
105
105
  if (this.scrollOffset < 0)
106
106
  this.scrollOffset = 0;
107
- let displayValue = this.value.substring(this.scrollOffset, this.scrollOffset + maxWidth);
108
- if (type === 'password') {
109
- displayValue = '*'.repeat(displayValue.length);
110
- }
111
107
  // Prepare content with cursor
112
108
  let renderedContent = "";
113
109
  const cursorRelPos = this.cursorIndex - this.scrollOffset;
@@ -82,7 +82,7 @@ class Menu {
82
82
  if (!this.active)
83
83
  return;
84
84
  // Re-use logic
85
- const consumed = this.handleKey(key);
85
+ this.handleKey(key);
86
86
  if (key.name === 'q' || key.name === 'escape') {
87
87
  this.active = false;
88
88
  process.exit(0);
@@ -93,7 +93,6 @@ class Select {
93
93
  const labelText = label ? `${label}: ` : '';
94
94
  const labelLen = labelText.length;
95
95
  if (label) {
96
- const labelStyle = this.isFocused ? 'brightCyan' : 'white';
97
96
  // If not focused, make it dim using modifier
98
97
  if (this.isFocused) {
99
98
  Screen_1.Screen.write(x, y, Styler_1.Styler.style(labelText, 'brightCyan', 'bold'));
@@ -48,8 +48,6 @@ class TabManager {
48
48
  let currentX = x;
49
49
  titles.forEach((title, index) => {
50
50
  const isActive = index === this.activeIndex;
51
- const style = isActive ? (this.isFocused ? 'brightCyan' : 'white') : 'dim';
52
- const decoration = isActive ? 'bold' : 'dim';
53
51
  const displayTitle = ` ${title} `;
54
52
  // Draw top border for active tab or something distinct?
55
53
  // Simple style: [ Active ] Inactive
@@ -135,7 +135,6 @@ class Textarea {
135
135
  // Draw Content
136
136
  const lines = this.value.split('\n');
137
137
  // We need to map cursorIndex to screen coordinates to draw the cursor character
138
- let charCounter = 0;
139
138
  for (let i = 0; i < innerHeight; i++) {
140
139
  const lineIndex = i + this.scrollTop;
141
140
  if (lineIndex < lines.length) {
@@ -88,7 +88,7 @@ class Layout {
88
88
  const rects = [];
89
89
  const map = new Map();
90
90
  let currentPos = direction === 'row' ? parent.x : parent.y;
91
- children.forEach((child, i) => {
91
+ children.forEach((child, _) => {
92
92
  let size = 0;
93
93
  if (child.fixed !== undefined) {
94
94
  size = child.fixed;
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ /* eslint-disable no-control-regex */
2
3
  // ==========================================
3
4
  // CORE: ANSI & STYLING
4
5
  // ==========================================
@@ -54,6 +55,7 @@ class Styler {
54
55
  (code >= 0xff00 && code <= 0xff60) || // Fullwidth Forms
55
56
  (code >= 0xffe0 && code <= 0xffe6) ||
56
57
  (code >= 0x1f300 && code <= 0x1f64f) || // Misc Symbols and Pictographs
58
+ (code >= 0x1f680 && code <= 0x1f6ff) || // Transport and Map Symbols
57
59
  (code >= 0x1f900 && code <= 0x1f9ff) // Supplemental Symbols and Pictographs
58
60
  ));
59
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voonex",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "A zero-dependency Terminal UI Library for Node.js.",
5
5
  "license": "MIT",
6
6
  "author": "CodeTease",
@@ -13,13 +13,21 @@
13
13
  "types": "dist/index.d.ts",
14
14
  "scripts": {
15
15
  "build": "tsc",
16
- "test": "ts-node examples/demo.ts",
16
+ "lint": "eslint src/**/*.ts",
17
+ "test": "jest",
17
18
  "prepublishOnly": "npm run build"
18
19
  },
19
20
  "devDependencies": {
21
+ "@eslint/js": "^9",
22
+ "@types/jest": "^30",
20
23
  "@types/node": "^22",
24
+ "eslint": "^9",
25
+ "globals": "^17",
26
+ "jest": "^30",
27
+ "ts-jest": "^29",
21
28
  "ts-node": "^10",
22
- "typescript": "^5"
29
+ "typescript": "^5",
30
+ "typescript-eslint": "^8.53.1"
23
31
  },
24
32
  "files": [
25
33
  "dist",