Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.d.ts 3.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. declare namespace ansiStyles {
  2. interface CSPair {
  3. /**
  4. The ANSI terminal control sequence for starting this style.
  5. */
  6. readonly open: string;
  7. /**
  8. The ANSI terminal control sequence for ending this style.
  9. */
  10. readonly close: string;
  11. }
  12. interface ColorBase {
  13. /**
  14. The ANSI terminal control sequence for ending this color.
  15. */
  16. readonly close: string;
  17. ansi256(code: number): string;
  18. ansi16m(red: number, green: number, blue: number): string;
  19. }
  20. interface Modifier {
  21. /**
  22. Resets the current color chain.
  23. */
  24. readonly reset: CSPair;
  25. /**
  26. Make text bold.
  27. */
  28. readonly bold: CSPair;
  29. /**
  30. Emitting only a small amount of light.
  31. */
  32. readonly dim: CSPair;
  33. /**
  34. Make text italic. (Not widely supported)
  35. */
  36. readonly italic: CSPair;
  37. /**
  38. Make text underline. (Not widely supported)
  39. */
  40. readonly underline: CSPair;
  41. /**
  42. Make text overline.
  43. Supported on VTE-based terminals, the GNOME terminal, mintty, and Git Bash.
  44. */
  45. readonly overline: CSPair;
  46. /**
  47. Inverse background and foreground colors.
  48. */
  49. readonly inverse: CSPair;
  50. /**
  51. Prints the text, but makes it invisible.
  52. */
  53. readonly hidden: CSPair;
  54. /**
  55. Puts a horizontal line through the center of the text. (Not widely supported)
  56. */
  57. readonly strikethrough: CSPair;
  58. }
  59. interface ForegroundColor {
  60. readonly black: CSPair;
  61. readonly red: CSPair;
  62. readonly green: CSPair;
  63. readonly yellow: CSPair;
  64. readonly blue: CSPair;
  65. readonly cyan: CSPair;
  66. readonly magenta: CSPair;
  67. readonly white: CSPair;
  68. /**
  69. Alias for `blackBright`.
  70. */
  71. readonly gray: CSPair;
  72. /**
  73. Alias for `blackBright`.
  74. */
  75. readonly grey: CSPair;
  76. readonly blackBright: CSPair;
  77. readonly redBright: CSPair;
  78. readonly greenBright: CSPair;
  79. readonly yellowBright: CSPair;
  80. readonly blueBright: CSPair;
  81. readonly cyanBright: CSPair;
  82. readonly magentaBright: CSPair;
  83. readonly whiteBright: CSPair;
  84. }
  85. interface BackgroundColor {
  86. readonly bgBlack: CSPair;
  87. readonly bgRed: CSPair;
  88. readonly bgGreen: CSPair;
  89. readonly bgYellow: CSPair;
  90. readonly bgBlue: CSPair;
  91. readonly bgCyan: CSPair;
  92. readonly bgMagenta: CSPair;
  93. readonly bgWhite: CSPair;
  94. /**
  95. Alias for `bgBlackBright`.
  96. */
  97. readonly bgGray: CSPair;
  98. /**
  99. Alias for `bgBlackBright`.
  100. */
  101. readonly bgGrey: CSPair;
  102. readonly bgBlackBright: CSPair;
  103. readonly bgRedBright: CSPair;
  104. readonly bgGreenBright: CSPair;
  105. readonly bgYellowBright: CSPair;
  106. readonly bgBlueBright: CSPair;
  107. readonly bgCyanBright: CSPair;
  108. readonly bgMagentaBright: CSPair;
  109. readonly bgWhiteBright: CSPair;
  110. }
  111. interface ConvertColor {
  112. /**
  113. Convert from the RGB color space to the ANSI 256 color space.
  114. @param red - (`0...255`)
  115. @param green - (`0...255`)
  116. @param blue - (`0...255`)
  117. */
  118. rgbToAnsi256(red: number, green: number, blue: number): number;
  119. /**
  120. Convert from the RGB HEX color space to the RGB color space.
  121. @param hex - A hexadecimal string containing RGB data.
  122. */
  123. hexToRgb(hex: string): [red: number, green: number, blue: number];
  124. /**
  125. Convert from the RGB HEX color space to the ANSI 256 color space.
  126. @param hex - A hexadecimal string containing RGB data.
  127. */
  128. hexToAnsi256(hex: string): number;
  129. }
  130. }
  131. declare const ansiStyles: {
  132. readonly modifier: ansiStyles.Modifier;
  133. readonly color: ansiStyles.ForegroundColor & ansiStyles.ColorBase;
  134. readonly bgColor: ansiStyles.BackgroundColor & ansiStyles.ColorBase;
  135. readonly codes: ReadonlyMap<number, number>;
  136. } & ansiStyles.BackgroundColor & ansiStyles.ForegroundColor & ansiStyles.Modifier & ansiStyles.ConvertColor;
  137. export = ansiStyles;