terminfo.dev 2.2.1 → 2.3.0
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 +1 -1
- package/src/index.ts +1 -1
- package/src/probes/index.ts +69 -8
package/package.json
CHANGED
package/src/index.ts
CHANGED
package/src/probes/index.ts
CHANGED
|
@@ -1197,14 +1197,75 @@ export const ALL_PROBES: Probe[] = [
|
|
|
1197
1197
|
modesInsertReplace,
|
|
1198
1198
|
modesApplicationKeypad,
|
|
1199
1199
|
|
|
1200
|
-
// ── Modes (DECRPM
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1200
|
+
// ── Modes (DECRPM with behavioral fallback) ──
|
|
1201
|
+
behavioralModeProbe(
|
|
1202
|
+
"modes.mouse-tracking", "Mouse tracking (DECSET 1000)", 1000,
|
|
1203
|
+
"\x1b[?1000h", "\x1b[?1000l",
|
|
1204
|
+
async () => {
|
|
1205
|
+
// Enable mouse tracking, verify terminal still responds
|
|
1206
|
+
const pos = await queryCursorPosition()
|
|
1207
|
+
return { pass: pos !== null, note: pos ? "Behavioral: responsive after enable" : "No response" }
|
|
1208
|
+
},
|
|
1209
|
+
),
|
|
1210
|
+
behavioralModeProbe(
|
|
1211
|
+
"modes.mouse-sgr", "SGR mouse (DECSET 1006)", 1006,
|
|
1212
|
+
"\x1b[?1006h", "\x1b[?1006l",
|
|
1213
|
+
async () => {
|
|
1214
|
+
const pos = await queryCursorPosition()
|
|
1215
|
+
return { pass: pos !== null, note: pos ? "Behavioral: responsive after enable" : "No response" }
|
|
1216
|
+
},
|
|
1217
|
+
),
|
|
1218
|
+
behavioralModeProbe(
|
|
1219
|
+
"modes.focus-tracking", "Focus tracking (DECSET 1004)", 1004,
|
|
1220
|
+
"\x1b[?1004h", "\x1b[?1004l",
|
|
1221
|
+
async () => {
|
|
1222
|
+
const pos = await queryCursorPosition()
|
|
1223
|
+
return { pass: pos !== null, note: pos ? "Behavioral: responsive after enable" : "No response" }
|
|
1224
|
+
},
|
|
1225
|
+
),
|
|
1226
|
+
behavioralModeProbe(
|
|
1227
|
+
"modes.application-cursor", "App cursor keys (DECCKM)", 1,
|
|
1228
|
+
"\x1b[?1h", "\x1b[?1l",
|
|
1229
|
+
async () => {
|
|
1230
|
+
// In DECCKM mode, arrow keys send ESC O A instead of ESC [ A
|
|
1231
|
+
// Can't test without pressing keys — just verify responsive
|
|
1232
|
+
const pos = await queryCursorPosition()
|
|
1233
|
+
return { pass: pos !== null, note: pos ? "Behavioral: responsive after enable" : "No response" }
|
|
1234
|
+
},
|
|
1235
|
+
),
|
|
1236
|
+
behavioralModeProbe(
|
|
1237
|
+
"modes.origin", "Origin mode (DECOM)", 6,
|
|
1238
|
+
"\x1b[?6h", "\x1b[?6l",
|
|
1239
|
+
async () => {
|
|
1240
|
+
// In origin mode, cursor is relative to scroll region
|
|
1241
|
+
// Set scroll region, enable origin, move to 1;1, check actual position
|
|
1242
|
+
process.stdout.write("\x1b[5;10r") // scroll region rows 5-10
|
|
1243
|
+
const pos = await queryCursorPosition()
|
|
1244
|
+
process.stdout.write("\x1b[r") // reset scroll region
|
|
1245
|
+
if (!pos) return { pass: false, note: "No response" }
|
|
1246
|
+
// In origin mode, cursor 1;1 maps to row 5 (top of region)
|
|
1247
|
+
return { pass: pos[0] >= 5, note: `Behavioral: cursor at row ${pos[0]} (origin mapped)` }
|
|
1248
|
+
},
|
|
1249
|
+
),
|
|
1250
|
+
behavioralModeProbe(
|
|
1251
|
+
"modes.reverse-video", "Reverse video (DECSCNM)", 5,
|
|
1252
|
+
"\x1b[?5h", "\x1b[?5l",
|
|
1253
|
+
async () => {
|
|
1254
|
+
// Reverse video swaps fg/bg — can't verify visually via PTY
|
|
1255
|
+
// Just verify terminal is responsive after toggling
|
|
1256
|
+
const pos = await queryCursorPosition()
|
|
1257
|
+
return { pass: pos !== null, note: pos ? "Behavioral: responsive after enable" : "No response" }
|
|
1258
|
+
},
|
|
1259
|
+
),
|
|
1260
|
+
behavioralModeProbe(
|
|
1261
|
+
"modes.synchronized-output", "Synchronized output (DECSET 2026)", 2026,
|
|
1262
|
+
"\x1b[?2026h", "\x1b[?2026l",
|
|
1263
|
+
async () => {
|
|
1264
|
+
// Synchronized output batches rendering — just verify responsive
|
|
1265
|
+
const pos = await queryCursorPosition()
|
|
1266
|
+
return { pass: pos !== null, note: pos ? "Behavioral: responsive after enable" : "No response" }
|
|
1267
|
+
},
|
|
1268
|
+
),
|
|
1208
1269
|
|
|
1209
1270
|
// ── Scrollback ──
|
|
1210
1271
|
scrollRegion,
|