vt100.js 0.1.2 → 0.1.3

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/index.d.mts CHANGED
@@ -41,6 +41,7 @@ interface Screen {
41
41
  reset(): void;
42
42
  getCell(row: number, col: number): ScreenCell;
43
43
  getLine(row: number): ScreenCell[];
44
+ getScrollbackLine(row: number): ScreenCell[];
44
45
  getText(): string;
45
46
  getTextRange(startRow: number, startCol: number, endRow: number, endCol: number): string;
46
47
  getCursorPosition(): {
package/dist/index.mjs CHANGED
@@ -489,6 +489,11 @@ function createScreen(opts) {
489
489
  if (!r) return makeRow(cols);
490
490
  return r.map((cell) => ({ ...cell }));
491
491
  }
492
+ function getScrollbackLine(row) {
493
+ const r = scrollback[row];
494
+ if (!r) return makeRow(cols);
495
+ return r.map((cell) => ({ ...cell }));
496
+ }
492
497
  function getText() {
493
498
  const lines = [];
494
499
  for (const row of scrollback) lines.push(rowToString(row));
@@ -544,6 +549,7 @@ function createScreen(opts) {
544
549
  reset: fullReset,
545
550
  getCell,
546
551
  getLine,
552
+ getScrollbackLine,
547
553
  getText,
548
554
  getTextRange,
549
555
  getCursorPosition: () => ({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vt100.js",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "VT100 terminal emulator — monochrome, cursor, scroll regions. Pure TypeScript, zero dependencies.",
5
5
  "keywords": [
6
6
  "ansi",
@@ -24,6 +24,8 @@
24
24
  "dist"
25
25
  ],
26
26
  "type": "module",
27
+ "main": "./dist/index.mjs",
28
+ "types": "./dist/index.d.mts",
27
29
  "exports": {
28
30
  ".": {
29
31
  "types": "./dist/index.d.mts",