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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "terminfo.dev",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
4
4
  "description": "Test your terminal's feature support and contribute to terminfo.dev",
5
5
  "keywords": [
6
6
  "ansi",
package/src/index.ts CHANGED
@@ -230,7 +230,7 @@ program
230
230
  notes: data.notes,
231
231
  responses: data.responses,
232
232
  generated: new Date().toISOString(),
233
- cliVersion: "2.2.0",
233
+ cliVersion: "2.3.0",
234
234
  probeCount: ALL_PROBES.length,
235
235
  })
236
236
  if (url) {
@@ -1197,14 +1197,75 @@ export const ALL_PROBES: Probe[] = [
1197
1197
  modesInsertReplace,
1198
1198
  modesApplicationKeypad,
1199
1199
 
1200
- // ── Modes (DECRPM only) ──
1201
- modeProbe("modes.mouse-tracking", "Mouse tracking (DECSET 1000)", 1000),
1202
- modeProbe("modes.mouse-sgr", "SGR mouse (DECSET 1006)", 1006),
1203
- modeProbe("modes.focus-tracking", "Focus tracking (DECSET 1004)", 1004),
1204
- modeProbe("modes.application-cursor", "App cursor keys (DECCKM)", 1),
1205
- modeProbe("modes.origin", "Origin mode (DECOM)", 6),
1206
- modeProbe("modes.reverse-video", "Reverse video (DECSCNM)", 5),
1207
- modeProbe("modes.synchronized-output", "Synchronized output (DECSET 2026)", 2026),
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,