wormclaude 1.0.133 → 1.0.135

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/dist/theme.js CHANGED
@@ -16,4 +16,4 @@ export const theme = {
16
16
  synType: '#a78bfa', // tip/sınıf adları, sabitler
17
17
  synProp: '#e0e0e0', // özellik/anahtar adları
18
18
  };
19
- export const VERSION = '1.0.133';
19
+ export const VERSION = '1.0.135';
package/dist/tui.js CHANGED
@@ -96,25 +96,30 @@ export async function runTui() {
96
96
  const inner = Math.max(4, W - 2); // "✶ " önek payı
97
97
  const REV = '\x1b[7m', UNREV = '\x1b[27m'; // ters-video blok imleç
98
98
  // Karakterleri hücreye çevir; imleçteki karakter ters-video (sondaysa boşluk bloğu).
99
- const cells = [];
100
- const chs = [...inputBuf];
101
- for (let i = 0; i < chs.length; i++) {
102
- cells.push({ s: i === inputCur ? REV + chs[i] + UNREV : chs[i], w: stringWidth(chs[i]) || 1 });
103
- }
104
- if (inputCur >= chs.length)
105
- cells.push({ s: REV + ' ' + UNREV, w: 1 });
106
- // Genişliğe göre sar.
99
+ // Karakterleri genişliğe göre sar; YAPIŞTIRILAN newline (\n) = sert satır kırma.
107
100
  const wrapped = [];
101
+ const chs = [...inputBuf];
108
102
  let cur = '', w = 0;
109
- for (const c of cells) {
110
- if (w + c.w > inner) {
103
+ for (let i = 0; i < chs.length; i++) {
104
+ if (chs[i] === '\n') { // çok-satır yapıştırma satır sonu
105
+ if (i === inputCur)
106
+ cur += REV + ' ' + UNREV;
107
+ wrapped.push(cur);
108
+ cur = '';
109
+ w = 0;
110
+ continue;
111
+ }
112
+ const cw = stringWidth(chs[i]) || 1;
113
+ if (w + cw > inner) {
111
114
  wrapped.push(cur);
112
115
  cur = '';
113
116
  w = 0;
114
117
  }
115
- cur += c.s;
116
- w += c.w;
118
+ cur += (i === inputCur ? REV + chs[i] + UNREV : chs[i]);
119
+ w += cw;
117
120
  }
121
+ if (inputCur >= chs.length)
122
+ cur += REV + ' ' + UNREV;
118
123
  wrapped.push(cur);
119
124
  if (wrapped.length <= MAX_INPUT_LINES) {
120
125
  return wrapped.map((ln, i) => (i === 0 ? paint('✶ ', theme.redBright, true) : ' ') + paint(ln, theme.white));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wormclaude",
3
- "version": "1.0.133",
3
+ "version": "1.0.135",
4
4
  "description": "WormClaude CLI - uncensored security+code assistant (ink TUI, Claude-style)",
5
5
  "type": "module",
6
6
  "bin": {