aboutsummaryrefslogtreecommitdiffstats
path: root/node_modules/xterm/src/common/data
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/xterm/src/common/data')
-rw-r--r--node_modules/xterm/src/common/data/Charsets.ts256
-rw-r--r--node_modules/xterm/src/common/data/EscapeSequences.ts150
2 files changed, 406 insertions, 0 deletions
diff --git a/node_modules/xterm/src/common/data/Charsets.ts b/node_modules/xterm/src/common/data/Charsets.ts
new file mode 100644
index 0000000..c72d5a2
--- /dev/null
+++ b/node_modules/xterm/src/common/data/Charsets.ts
@@ -0,0 +1,256 @@
+/**
+ * Copyright (c) 2016 The xterm.js authors. All rights reserved.
+ * @license MIT
+ */
+
+import { ICharset } from 'common/Types';
+
+/**
+ * The character sets supported by the terminal. These enable several languages
+ * to be represented within the terminal with only 8-bit encoding. See ISO 2022
+ * for a discussion on character sets. Only VT100 character sets are supported.
+ */
+export const CHARSETS: { [key: string]: ICharset | undefined } = {};
+
+/**
+ * The default character set, US.
+ */
+export const DEFAULT_CHARSET: ICharset | undefined = CHARSETS['B'];
+
+/**
+ * DEC Special Character and Line Drawing Set.
+ * Reference: http://vt100.net/docs/vt102-ug/table5-13.html
+ * A lot of curses apps use this if they see TERM=xterm.
+ * testing: echo -e '\e(0a\e(B'
+ * The xterm output sometimes seems to conflict with the
+ * reference above. xterm seems in line with the reference
+ * when running vttest however.
+ * The table below now uses xterm's output from vttest.
+ */
+CHARSETS['0'] = {
+ '`': '\u25c6', // '◆'
+ 'a': '\u2592', // '▒'
+ 'b': '\u2409', // '␉' (HT)
+ 'c': '\u240c', // '␌' (FF)
+ 'd': '\u240d', // '␍' (CR)
+ 'e': '\u240a', // '␊' (LF)
+ 'f': '\u00b0', // '°'
+ 'g': '\u00b1', // '±'
+ 'h': '\u2424', // '␤' (NL)
+ 'i': '\u240b', // '␋' (VT)
+ 'j': '\u2518', // '┘'
+ 'k': '\u2510', // '┐'
+ 'l': '\u250c', // '┌'
+ 'm': '\u2514', // '└'
+ 'n': '\u253c', // '┼'
+ 'o': '\u23ba', // '⎺'
+ 'p': '\u23bb', // '⎻'
+ 'q': '\u2500', // '─'
+ 'r': '\u23bc', // '⎼'
+ 's': '\u23bd', // '⎽'
+ 't': '\u251c', // '├'
+ 'u': '\u2524', // '┤'
+ 'v': '\u2534', // '┴'
+ 'w': '\u252c', // '┬'
+ 'x': '\u2502', // '│'
+ 'y': '\u2264', // '≤'
+ 'z': '\u2265', // '≥'
+ '{': '\u03c0', // 'π'
+ '|': '\u2260', // '≠'
+ '}': '\u00a3', // '£'
+ '~': '\u00b7' // '·'
+};
+
+/**
+ * British character set
+ * ESC (A
+ * Reference: http://vt100.net/docs/vt220-rm/table2-5.html
+ */
+CHARSETS['A'] = {
+ '#': '£'
+};
+
+/**
+ * United States character set
+ * ESC (B
+ */
+CHARSETS['B'] = undefined;
+
+/**
+ * Dutch character set
+ * ESC (4
+ * Reference: http://vt100.net/docs/vt220-rm/table2-6.html
+ */
+CHARSETS['4'] = {
+ '#': '£',
+ '@': '¾',
+ '[': 'ij',
+ '\\': '½',
+ ']': '|',
+ '{': '¨',
+ '|': 'f',
+ '}': '¼',
+ '~': '´'
+};
+
+/**
+ * Finnish character set
+ * ESC (C or ESC (5
+ * Reference: http://vt100.net/docs/vt220-rm/table2-7.html
+ */
+CHARSETS['C'] =
+CHARSETS['5'] = {
+ '[': 'Ä',
+ '\\': 'Ö',
+ ']': 'Å',
+ '^': 'Ü',
+ '`': 'é',
+ '{': 'ä',
+ '|': 'ö',
+ '}': 'å',
+ '~': 'ü'
+};
+
+/**
+ * French character set
+ * ESC (R
+ * Reference: http://vt100.net/docs/vt220-rm/table2-8.html
+ */
+CHARSETS['R'] = {
+ '#': '£',
+ '@': 'à',
+ '[': '°',
+ '\\': 'ç',
+ ']': '§',
+ '{': 'é',
+ '|': 'ù',
+ '}': 'è',
+ '~': '¨'
+};
+
+/**
+ * French Canadian character set
+ * ESC (Q
+ * Reference: http://vt100.net/docs/vt220-rm/table2-9.html
+ */
+CHARSETS['Q'] = {
+ '@': 'à',
+ '[': 'â',
+ '\\': 'ç',
+ ']': 'ê',
+ '^': 'î',
+ '`': 'ô',
+ '{': 'é',
+ '|': 'ù',
+ '}': 'è',
+ '~': 'û'
+};
+
+/**
+ * German character set
+ * ESC (K
+ * Reference: http://vt100.net/docs/vt220-rm/table2-10.html
+ */
+CHARSETS['K'] = {
+ '@': '§',
+ '[': 'Ä',
+ '\\': 'Ö',
+ ']': 'Ü',
+ '{': 'ä',
+ '|': 'ö',
+ '}': 'ü',
+ '~': 'ß'
+};
+
+/**
+ * Italian character set
+ * ESC (Y
+ * Reference: http://vt100.net/docs/vt220-rm/table2-11.html
+ */
+CHARSETS['Y'] = {
+ '#': '£',
+ '@': '§',
+ '[': '°',
+ '\\': 'ç',
+ ']': 'é',
+ '`': 'ù',
+ '{': 'à',
+ '|': 'ò',
+ '}': 'è',
+ '~': 'ì'
+};
+
+/**
+ * Norwegian/Danish character set
+ * ESC (E or ESC (6
+ * Reference: http://vt100.net/docs/vt220-rm/table2-12.html
+ */
+CHARSETS['E'] =
+CHARSETS['6'] = {
+ '@': 'Ä',
+ '[': 'Æ',
+ '\\': 'Ø',
+ ']': 'Å',
+ '^': 'Ü',
+ '`': 'ä',
+ '{': 'æ',
+ '|': 'ø',
+ '}': 'å',
+ '~': 'ü'
+};
+
+/**
+ * Spanish character set
+ * ESC (Z
+ * Reference: http://vt100.net/docs/vt220-rm/table2-13.html
+ */
+CHARSETS['Z'] = {
+ '#': '£',
+ '@': '§',
+ '[': '¡',
+ '\\': 'Ñ',
+ ']': '¿',
+ '{': '°',
+ '|': 'ñ',
+ '}': 'ç'
+};
+
+/**
+ * Swedish character set
+ * ESC (H or ESC (7
+ * Reference: http://vt100.net/docs/vt220-rm/table2-14.html
+ */
+CHARSETS['H'] =
+CHARSETS['7'] = {
+ '@': 'É',
+ '[': 'Ä',
+ '\\': 'Ö',
+ ']': 'Å',
+ '^': 'Ü',
+ '`': 'é',
+ '{': 'ä',
+ '|': 'ö',
+ '}': 'å',
+ '~': 'ü'
+};
+
+/**
+ * Swiss character set
+ * ESC (=
+ * Reference: http://vt100.net/docs/vt220-rm/table2-15.html
+ */
+CHARSETS['='] = {
+ '#': 'ù',
+ '@': 'à',
+ '[': 'é',
+ '\\': 'ç',
+ ']': 'ê',
+ '^': 'î',
+ // eslint-disable-next-line @typescript-eslint/naming-convention
+ '_': 'è',
+ '`': 'ô',
+ '{': 'ä',
+ '|': 'ö',
+ '}': 'ü',
+ '~': 'û'
+};
diff --git a/node_modules/xterm/src/common/data/EscapeSequences.ts b/node_modules/xterm/src/common/data/EscapeSequences.ts
new file mode 100644
index 0000000..e35f01d
--- /dev/null
+++ b/node_modules/xterm/src/common/data/EscapeSequences.ts
@@ -0,0 +1,150 @@
+/**
+ * Copyright (c) 2017 The xterm.js authors. All rights reserved.
+ * @license MIT
+ */
+
+/**
+ * C0 control codes
+ * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes
+ */
+export namespace C0 {
+ /** Null (Caret = ^@, C = \0) */
+ export const NUL = '\x00';
+ /** Start of Heading (Caret = ^A) */
+ export const SOH = '\x01';
+ /** Start of Text (Caret = ^B) */
+ export const STX = '\x02';
+ /** End of Text (Caret = ^C) */
+ export const ETX = '\x03';
+ /** End of Transmission (Caret = ^D) */
+ export const EOT = '\x04';
+ /** Enquiry (Caret = ^E) */
+ export const ENQ = '\x05';
+ /** Acknowledge (Caret = ^F) */
+ export const ACK = '\x06';
+ /** Bell (Caret = ^G, C = \a) */
+ export const BEL = '\x07';
+ /** Backspace (Caret = ^H, C = \b) */
+ export const BS = '\x08';
+ /** Character Tabulation, Horizontal Tabulation (Caret = ^I, C = \t) */
+ export const HT = '\x09';
+ /** Line Feed (Caret = ^J, C = \n) */
+ export const LF = '\x0a';
+ /** Line Tabulation, Vertical Tabulation (Caret = ^K, C = \v) */
+ export const VT = '\x0b';
+ /** Form Feed (Caret = ^L, C = \f) */
+ export const FF = '\x0c';
+ /** Carriage Return (Caret = ^M, C = \r) */
+ export const CR = '\x0d';
+ /** Shift Out (Caret = ^N) */
+ export const SO = '\x0e';
+ /** Shift In (Caret = ^O) */
+ export const SI = '\x0f';
+ /** Data Link Escape (Caret = ^P) */
+ export const DLE = '\x10';
+ /** Device Control One (XON) (Caret = ^Q) */
+ export const DC1 = '\x11';
+ /** Device Control Two (Caret = ^R) */
+ export const DC2 = '\x12';
+ /** Device Control Three (XOFF) (Caret = ^S) */
+ export const DC3 = '\x13';
+ /** Device Control Four (Caret = ^T) */
+ export const DC4 = '\x14';
+ /** Negative Acknowledge (Caret = ^U) */
+ export const NAK = '\x15';
+ /** Synchronous Idle (Caret = ^V) */
+ export const SYN = '\x16';
+ /** End of Transmission Block (Caret = ^W) */
+ export const ETB = '\x17';
+ /** Cancel (Caret = ^X) */
+ export const CAN = '\x18';
+ /** End of Medium (Caret = ^Y) */
+ export const EM = '\x19';
+ /** Substitute (Caret = ^Z) */
+ export const SUB = '\x1a';
+ /** Escape (Caret = ^[, C = \e) */
+ export const ESC = '\x1b';
+ /** File Separator (Caret = ^\) */
+ export const FS = '\x1c';
+ /** Group Separator (Caret = ^]) */
+ export const GS = '\x1d';
+ /** Record Separator (Caret = ^^) */
+ export const RS = '\x1e';
+ /** Unit Separator (Caret = ^_) */
+ export const US = '\x1f';
+ /** Space */
+ export const SP = '\x20';
+ /** Delete (Caret = ^?) */
+ export const DEL = '\x7f';
+}
+
+/**
+ * C1 control codes
+ * See = https://en.wikipedia.org/wiki/C0_and_C1_control_codes
+ */
+export namespace C1 {
+ /** padding character */
+ export const PAD = '\x80';
+ /** High Octet Preset */
+ export const HOP = '\x81';
+ /** Break Permitted Here */
+ export const BPH = '\x82';
+ /** No Break Here */
+ export const NBH = '\x83';
+ /** Index */
+ export const IND = '\x84';
+ /** Next Line */
+ export const NEL = '\x85';
+ /** Start of Selected Area */
+ export const SSA = '\x86';
+ /** End of Selected Area */
+ export const ESA = '\x87';
+ /** Horizontal Tabulation Set */
+ export const HTS = '\x88';
+ /** Horizontal Tabulation With Justification */
+ export const HTJ = '\x89';
+ /** Vertical Tabulation Set */
+ export const VTS = '\x8a';
+ /** Partial Line Down */
+ export const PLD = '\x8b';
+ /** Partial Line Up */
+ export const PLU = '\x8c';
+ /** Reverse Index */
+ export const RI = '\x8d';
+ /** Single-Shift 2 */
+ export const SS2 = '\x8e';
+ /** Single-Shift 3 */
+ export const SS3 = '\x8f';
+ /** Device Control String */
+ export const DCS = '\x90';
+ /** Private Use 1 */
+ export const PU1 = '\x91';
+ /** Private Use 2 */
+ export const PU2 = '\x92';
+ /** Set Transmit State */
+ export const STS = '\x93';
+ /** Destructive backspace, intended to eliminate ambiguity about meaning of BS. */
+ export const CCH = '\x94';
+ /** Message Waiting */
+ export const MW = '\x95';
+ /** Start of Protected Area */
+ export const SPA = '\x96';
+ /** End of Protected Area */
+ export const EPA = '\x97';
+ /** Start of String */
+ export const SOS = '\x98';
+ /** Single Graphic Character Introducer */
+ export const SGCI = '\x99';
+ /** Single Character Introducer */
+ export const SCI = '\x9a';
+ /** Control Sequence Introducer */
+ export const CSI = '\x9b';
+ /** String Terminator */
+ export const ST = '\x9c';
+ /** Operating System Command */
+ export const OSC = '\x9d';
+ /** Privacy Message */
+ export const PM = '\x9e';
+ /** Application Program Command */
+ export const APC = '\x9f';
+}