create-mendix-widget-gleam 2.0.13 → 2.0.15

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.
Files changed (205) hide show
  1. package/README.md +3 -2
  2. package/package.json +5 -1
  3. package/src/index.mjs +22 -7
  4. package/src/templates/readme_md.mjs +6 -6
  5. package/template/docs/glendix_guide.md +204 -1
  6. package/template/gleam.toml +1 -1
  7. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache +0 -0
  8. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache_inline +0 -0
  9. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@command.cache_meta +0 -0
  10. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache +0 -0
  11. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache_inline +0 -0
  12. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@cursor.cache_meta +0 -0
  13. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache +0 -0
  14. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache_inline +0 -0
  15. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@event.cache_meta +0 -0
  16. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache +0 -0
  17. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache_inline +0 -0
  18. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@internal@consts.cache_meta +0 -0
  19. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache +0 -0
  20. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache_inline +0 -0
  21. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@stdout.cache_meta +0 -0
  22. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache +0 -0
  23. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache_inline +0 -0
  24. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@style.cache_meta +0 -0
  25. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache +0 -0
  26. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache_inline +0 -0
  27. package/tui/build/dev/javascript/etch/_gleam_artefacts/etch@terminal.cache_meta +0 -0
  28. package/tui/build/dev/javascript/etch/etch/command.mjs +479 -0
  29. package/tui/build/dev/javascript/etch/etch/cursor.mjs +164 -0
  30. package/tui/build/dev/javascript/etch/etch/event.mjs +2399 -0
  31. package/tui/build/dev/javascript/etch/etch/internal/consts.mjs +3 -0
  32. package/tui/build/dev/javascript/etch/etch/stdout.mjs +375 -0
  33. package/tui/build/dev/javascript/etch/etch/style.mjs +741 -0
  34. package/tui/build/dev/javascript/etch/etch/terminal.mjs +137 -0
  35. package/tui/build/dev/javascript/etch/gleam.mjs +1 -0
  36. package/tui/build/dev/javascript/etch/input/event_ffi.erl +73 -0
  37. package/tui/build/dev/javascript/etch/input/input_ffi.mjs +192 -0
  38. package/tui/build/dev/javascript/etch/input/signal_handler.erl +33 -0
  39. package/tui/build/dev/javascript/etch/terminal/terminal_ffi.erl +22 -0
  40. package/tui/build/dev/javascript/etch/terminal/terminal_ffi.mjs +37 -0
  41. package/tui/build/dev/javascript/etch/terminal/tty_state.erl +29 -0
  42. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache +0 -0
  43. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache_inline +0 -0
  44. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@application.cache_meta +0 -0
  45. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache +0 -0
  46. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache_inline +0 -0
  47. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@atom.cache_meta +0 -0
  48. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache +0 -0
  49. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache_inline +0 -0
  50. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@charlist.cache_meta +0 -0
  51. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache +0 -0
  52. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache_inline +0 -0
  53. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@node.cache_meta +0 -0
  54. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache +0 -0
  55. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache_inline +0 -0
  56. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@port.cache_meta +0 -0
  57. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache +0 -0
  58. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache_inline +0 -0
  59. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@process.cache_meta +0 -0
  60. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache +0 -0
  61. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache_inline +0 -0
  62. package/tui/build/dev/javascript/gleam_erlang/_gleam_artefacts/gleam@erlang@reference.cache_meta +0 -0
  63. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/application.mjs +38 -0
  64. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/atom.mjs +2 -0
  65. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/charlist.mjs +1 -0
  66. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/node.mjs +12 -0
  67. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/port.mjs +1 -0
  68. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/process.mjs +161 -0
  69. package/tui/build/dev/javascript/gleam_erlang/gleam/erlang/reference.mjs +1 -0
  70. package/tui/build/dev/javascript/gleam_erlang/gleam.mjs +1 -0
  71. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@application.erl +43 -0
  72. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@atom.erl +94 -0
  73. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@charlist.erl +42 -0
  74. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@node.erl +80 -0
  75. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@port.erl +8 -0
  76. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@process.erl +868 -0
  77. package/tui/build/dev/javascript/gleam_erlang/gleam@erlang@reference.erl +21 -0
  78. package/tui/build/dev/javascript/gleam_erlang/gleam_erlang_ffi.erl +164 -0
  79. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache +0 -0
  80. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache_inline +0 -0
  81. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@array.cache_meta +0 -0
  82. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache +0 -0
  83. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache_inline +0 -0
  84. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@promise.cache_meta +0 -0
  85. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache +0 -0
  86. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache_inline +0 -0
  87. package/tui/build/dev/javascript/gleam_javascript/_gleam_artefacts/gleam@javascript@symbol.cache_meta +0 -0
  88. package/tui/build/dev/javascript/gleam_javascript/gleam/javascript/array.mjs +24 -0
  89. package/tui/build/dev/javascript/gleam_javascript/gleam/javascript/promise.mjs +105 -0
  90. package/tui/build/dev/javascript/gleam_javascript/gleam/javascript/symbol.mjs +7 -0
  91. package/tui/build/dev/javascript/gleam_javascript/gleam.mjs +1 -0
  92. package/tui/build/dev/javascript/gleam_javascript/gleam_javascript_ffi.mjs +133 -0
  93. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache +0 -0
  94. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_inline +0 -0
  95. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bit_array.cache_meta +0 -0
  96. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache +0 -0
  97. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_inline +0 -0
  98. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bool.cache_meta +0 -0
  99. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache +0 -0
  100. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_inline +0 -0
  101. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@bytes_tree.cache_meta +0 -0
  102. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache +0 -0
  103. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_inline +0 -0
  104. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dict.cache_meta +0 -0
  105. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache +0 -0
  106. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_inline +0 -0
  107. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic.cache_meta +0 -0
  108. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache +0 -0
  109. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_inline +0 -0
  110. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@dynamic@decode.cache_meta +0 -0
  111. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache +0 -0
  112. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_inline +0 -0
  113. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@float.cache_meta +0 -0
  114. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache +0 -0
  115. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_inline +0 -0
  116. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@function.cache_meta +0 -0
  117. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache +0 -0
  118. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_inline +0 -0
  119. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@int.cache_meta +0 -0
  120. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache +0 -0
  121. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_inline +0 -0
  122. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@io.cache_meta +0 -0
  123. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache +0 -0
  124. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_inline +0 -0
  125. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@list.cache_meta +0 -0
  126. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache +0 -0
  127. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_inline +0 -0
  128. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@option.cache_meta +0 -0
  129. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache +0 -0
  130. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_inline +0 -0
  131. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@order.cache_meta +0 -0
  132. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache +0 -0
  133. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_inline +0 -0
  134. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@pair.cache_meta +0 -0
  135. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache +0 -0
  136. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_inline +0 -0
  137. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@result.cache_meta +0 -0
  138. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache +0 -0
  139. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_inline +0 -0
  140. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@set.cache_meta +0 -0
  141. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache +0 -0
  142. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_inline +0 -0
  143. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string.cache_meta +0 -0
  144. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache +0 -0
  145. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_inline +0 -0
  146. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@string_tree.cache_meta +0 -0
  147. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache +0 -0
  148. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_inline +0 -0
  149. package/tui/build/dev/javascript/gleam_stdlib/_gleam_artefacts/gleam@uri.cache_meta +0 -0
  150. package/tui/build/dev/javascript/gleam_stdlib/dict.mjs +710 -0
  151. package/tui/build/dev/javascript/gleam_stdlib/gleam/bit_array.mjs +286 -0
  152. package/tui/build/dev/javascript/gleam_stdlib/gleam/bool.mjs +295 -0
  153. package/tui/build/dev/javascript/gleam_stdlib/gleam/bytes_tree.mjs +225 -0
  154. package/tui/build/dev/javascript/gleam_stdlib/gleam/dict.mjs +455 -0
  155. package/tui/build/dev/javascript/gleam_stdlib/gleam/dynamic/decode.mjs +993 -0
  156. package/tui/build/dev/javascript/gleam_stdlib/gleam/dynamic.mjs +35 -0
  157. package/tui/build/dev/javascript/gleam_stdlib/gleam/float.mjs +528 -0
  158. package/tui/build/dev/javascript/gleam_stdlib/gleam/function.mjs +6 -0
  159. package/tui/build/dev/javascript/gleam_stdlib/gleam/int.mjs +764 -0
  160. package/tui/build/dev/javascript/gleam_stdlib/gleam/io.mjs +8 -0
  161. package/tui/build/dev/javascript/gleam_stdlib/gleam/list.mjs +3063 -0
  162. package/tui/build/dev/javascript/gleam_stdlib/gleam/option.mjs +386 -0
  163. package/tui/build/dev/javascript/gleam_stdlib/gleam/order.mjs +166 -0
  164. package/tui/build/dev/javascript/gleam_stdlib/gleam/pair.mjs +96 -0
  165. package/tui/build/dev/javascript/gleam_stdlib/gleam/result.mjs +448 -0
  166. package/tui/build/dev/javascript/gleam_stdlib/gleam/set.mjs +413 -0
  167. package/tui/build/dev/javascript/gleam_stdlib/gleam/string.mjs +695 -0
  168. package/tui/build/dev/javascript/gleam_stdlib/gleam/string_tree.mjs +128 -0
  169. package/tui/build/dev/javascript/gleam_stdlib/gleam/uri.mjs +1151 -0
  170. package/tui/build/dev/javascript/gleam_stdlib/gleam.mjs +1 -0
  171. package/tui/build/dev/javascript/gleam_stdlib/gleam@bit_array.erl +347 -0
  172. package/tui/build/dev/javascript/gleam_stdlib/gleam@bool.erl +334 -0
  173. package/tui/build/dev/javascript/gleam_stdlib/gleam@bytes_tree.erl +211 -0
  174. package/tui/build/dev/javascript/gleam_stdlib/gleam@dict.erl +513 -0
  175. package/tui/build/dev/javascript/gleam_stdlib/gleam@dynamic.erl +105 -0
  176. package/tui/build/dev/javascript/gleam_stdlib/gleam@dynamic@decode.erl +1114 -0
  177. package/tui/build/dev/javascript/gleam_stdlib/gleam@float.erl +711 -0
  178. package/tui/build/dev/javascript/gleam_stdlib/gleam@function.erl +18 -0
  179. package/tui/build/dev/javascript/gleam_stdlib/gleam@int.erl +972 -0
  180. package/tui/build/dev/javascript/gleam_stdlib/gleam@io.erl +76 -0
  181. package/tui/build/dev/javascript/gleam_stdlib/gleam@list.erl +2735 -0
  182. package/tui/build/dev/javascript/gleam_stdlib/gleam@option.erl +381 -0
  183. package/tui/build/dev/javascript/gleam_stdlib/gleam@order.erl +188 -0
  184. package/tui/build/dev/javascript/gleam_stdlib/gleam@pair.erl +104 -0
  185. package/tui/build/dev/javascript/gleam_stdlib/gleam@result.erl +500 -0
  186. package/tui/build/dev/javascript/gleam_stdlib/gleam@set.erl +430 -0
  187. package/tui/build/dev/javascript/gleam_stdlib/gleam@string.erl +964 -0
  188. package/tui/build/dev/javascript/gleam_stdlib/gleam@string_tree.erl +202 -0
  189. package/tui/build/dev/javascript/gleam_stdlib/gleam@uri.erl +1042 -0
  190. package/tui/build/dev/javascript/gleam_stdlib/gleam_stdlib.erl +534 -0
  191. package/tui/build/dev/javascript/gleam_stdlib/gleam_stdlib.mjs +1133 -0
  192. package/tui/build/dev/javascript/gleam_version +1 -0
  193. package/tui/build/dev/javascript/prelude.mjs +1575 -0
  194. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache +0 -0
  195. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_inline +0 -0
  196. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_meta +0 -0
  197. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui.cache_warnings +0 -0
  198. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache +0 -0
  199. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_inline +0 -0
  200. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_meta +0 -0
  201. package/tui/build/dev/javascript/tui/_gleam_artefacts/tui@prompt.cache_warnings +0 -0
  202. package/tui/build/dev/javascript/tui/gleam.mjs +1 -0
  203. package/tui/build/dev/javascript/tui/tui/prompt.mjs +521 -0
  204. package/tui/build/dev/javascript/tui/tui.mjs +334 -0
  205. package/tui/build/dev/javascript/tui/tui_ffi.mjs +32 -0
@@ -0,0 +1,741 @@
1
+ import * as $int from "../../gleam_stdlib/gleam/int.mjs";
2
+ import * as $consts from "../etch/internal/consts.mjs";
3
+ import { csi } from "../etch/internal/consts.mjs";
4
+ import { toList, Empty as $Empty, CustomType as $CustomType } from "../gleam.mjs";
5
+
6
+ export class Default extends $CustomType {}
7
+ export const Color$Default = () => new Default();
8
+ export const Color$isDefault = (value) => value instanceof Default;
9
+
10
+ export class Black extends $CustomType {}
11
+ export const Color$Black = () => new Black();
12
+ export const Color$isBlack = (value) => value instanceof Black;
13
+
14
+ export class Grey extends $CustomType {}
15
+ export const Color$Grey = () => new Grey();
16
+ export const Color$isGrey = (value) => value instanceof Grey;
17
+
18
+ export class Red extends $CustomType {}
19
+ export const Color$Red = () => new Red();
20
+ export const Color$isRed = (value) => value instanceof Red;
21
+
22
+ export class BrightRed extends $CustomType {}
23
+ export const Color$BrightRed = () => new BrightRed();
24
+ export const Color$isBrightRed = (value) => value instanceof BrightRed;
25
+
26
+ export class Green extends $CustomType {}
27
+ export const Color$Green = () => new Green();
28
+ export const Color$isGreen = (value) => value instanceof Green;
29
+
30
+ export class BrightGreen extends $CustomType {}
31
+ export const Color$BrightGreen = () => new BrightGreen();
32
+ export const Color$isBrightGreen = (value) => value instanceof BrightGreen;
33
+
34
+ export class Yellow extends $CustomType {}
35
+ export const Color$Yellow = () => new Yellow();
36
+ export const Color$isYellow = (value) => value instanceof Yellow;
37
+
38
+ export class BrightYellow extends $CustomType {}
39
+ export const Color$BrightYellow = () => new BrightYellow();
40
+ export const Color$isBrightYellow = (value) => value instanceof BrightYellow;
41
+
42
+ export class Blue extends $CustomType {}
43
+ export const Color$Blue = () => new Blue();
44
+ export const Color$isBlue = (value) => value instanceof Blue;
45
+
46
+ export class BrightBlue extends $CustomType {}
47
+ export const Color$BrightBlue = () => new BrightBlue();
48
+ export const Color$isBrightBlue = (value) => value instanceof BrightBlue;
49
+
50
+ export class Magenta extends $CustomType {}
51
+ export const Color$Magenta = () => new Magenta();
52
+ export const Color$isMagenta = (value) => value instanceof Magenta;
53
+
54
+ export class BrightMagenta extends $CustomType {}
55
+ export const Color$BrightMagenta = () => new BrightMagenta();
56
+ export const Color$isBrightMagenta = (value) => value instanceof BrightMagenta;
57
+
58
+ export class Cyan extends $CustomType {}
59
+ export const Color$Cyan = () => new Cyan();
60
+ export const Color$isCyan = (value) => value instanceof Cyan;
61
+
62
+ export class BrightCyan extends $CustomType {}
63
+ export const Color$BrightCyan = () => new BrightCyan();
64
+ export const Color$isBrightCyan = (value) => value instanceof BrightCyan;
65
+
66
+ export class White extends $CustomType {}
67
+ export const Color$White = () => new White();
68
+ export const Color$isWhite = (value) => value instanceof White;
69
+
70
+ export class BrightWhite extends $CustomType {}
71
+ export const Color$BrightWhite = () => new BrightWhite();
72
+ export const Color$isBrightWhite = (value) => value instanceof BrightWhite;
73
+
74
+ export class BrightGrey extends $CustomType {}
75
+ export const Color$BrightGrey = () => new BrightGrey();
76
+ export const Color$isBrightGrey = (value) => value instanceof BrightGrey;
77
+
78
+ /**
79
+ * Ansi color (256 colors). See https://www.ditig.com/256-colors-cheat-sheet.
80
+ */
81
+ export class AnsiValue extends $CustomType {
82
+ constructor(v) {
83
+ super();
84
+ this.v = v;
85
+ }
86
+ }
87
+ export const Color$AnsiValue = (v) => new AnsiValue(v);
88
+ export const Color$isAnsiValue = (value) => value instanceof AnsiValue;
89
+ export const Color$AnsiValue$v = (value) => value.v;
90
+ export const Color$AnsiValue$0 = (value) => value.v;
91
+
92
+ /**
93
+ * RGB color.
94
+ */
95
+ export class Rgb extends $CustomType {
96
+ constructor(r, g, b) {
97
+ super();
98
+ this.r = r;
99
+ this.g = g;
100
+ this.b = b;
101
+ }
102
+ }
103
+ export const Color$Rgb = (r, g, b) => new Rgb(r, g, b);
104
+ export const Color$isRgb = (value) => value instanceof Rgb;
105
+ export const Color$Rgb$r = (value) => value.r;
106
+ export const Color$Rgb$0 = (value) => value.r;
107
+ export const Color$Rgb$g = (value) => value.g;
108
+ export const Color$Rgb$1 = (value) => value.g;
109
+ export const Color$Rgb$b = (value) => value.b;
110
+ export const Color$Rgb$2 = (value) => value.b;
111
+
112
+ export class Bold extends $CustomType {}
113
+ export const Attribute$Bold = () => new Bold();
114
+ export const Attribute$isBold = (value) => value instanceof Bold;
115
+
116
+ export class Dim extends $CustomType {}
117
+ export const Attribute$Dim = () => new Dim();
118
+ export const Attribute$isDim = (value) => value instanceof Dim;
119
+
120
+ export class Underline extends $CustomType {}
121
+ export const Attribute$Underline = () => new Underline();
122
+ export const Attribute$isUnderline = (value) => value instanceof Underline;
123
+
124
+ export class Italic extends $CustomType {}
125
+ export const Attribute$Italic = () => new Italic();
126
+ export const Attribute$isItalic = (value) => value instanceof Italic;
127
+
128
+ export class Blinking extends $CustomType {}
129
+ export const Attribute$Blinking = () => new Blinking();
130
+ export const Attribute$isBlinking = (value) => value instanceof Blinking;
131
+
132
+ export class Inverse extends $CustomType {}
133
+ export const Attribute$Inverse = () => new Inverse();
134
+ export const Attribute$isInverse = (value) => value instanceof Inverse;
135
+
136
+ export class Style extends $CustomType {
137
+ constructor(bg, fg, attributes) {
138
+ super();
139
+ this.bg = bg;
140
+ this.fg = fg;
141
+ this.attributes = attributes;
142
+ }
143
+ }
144
+ export const Style$Style = (bg, fg, attributes) =>
145
+ new Style(bg, fg, attributes);
146
+ export const Style$isStyle = (value) => value instanceof Style;
147
+ export const Style$Style$bg = (value) => value.bg;
148
+ export const Style$Style$0 = (value) => value.bg;
149
+ export const Style$Style$fg = (value) => value.fg;
150
+ export const Style$Style$1 = (value) => value.fg;
151
+ export const Style$Style$attributes = (value) => value.attributes;
152
+ export const Style$Style$2 = (value) => value.attributes;
153
+
154
+ /**
155
+ * Returns default [`Style`](style.html#Style) with terminal's default
156
+ * foreground and background [`Colors`](style.html#Color))
157
+ * and no [`Attributes`](style.html#Attribute).
158
+ */
159
+ export function default_style() {
160
+ return new Style(new Default(), new Default(), toList([]));
161
+ }
162
+
163
+ function get_fg(c) {
164
+ if (c instanceof Default) {
165
+ return "39";
166
+ } else if (c instanceof Black) {
167
+ return "30";
168
+ } else if (c instanceof Grey) {
169
+ return "90";
170
+ } else if (c instanceof Red) {
171
+ return "31";
172
+ } else if (c instanceof BrightRed) {
173
+ return "91";
174
+ } else if (c instanceof Green) {
175
+ return "32";
176
+ } else if (c instanceof BrightGreen) {
177
+ return "92";
178
+ } else if (c instanceof Yellow) {
179
+ return "33";
180
+ } else if (c instanceof BrightYellow) {
181
+ return "93";
182
+ } else if (c instanceof Blue) {
183
+ return "34";
184
+ } else if (c instanceof BrightBlue) {
185
+ return "94";
186
+ } else if (c instanceof Magenta) {
187
+ return "35";
188
+ } else if (c instanceof BrightMagenta) {
189
+ return "95";
190
+ } else if (c instanceof Cyan) {
191
+ return "36";
192
+ } else if (c instanceof BrightCyan) {
193
+ return "96";
194
+ } else if (c instanceof White) {
195
+ return "37";
196
+ } else if (c instanceof BrightWhite) {
197
+ return "97";
198
+ } else if (c instanceof BrightGrey) {
199
+ return "38;5;7";
200
+ } else if (c instanceof AnsiValue) {
201
+ let v = c.v;
202
+ return "38;5;" + $int.to_string(v);
203
+ } else {
204
+ let r = c.r;
205
+ let g = c.g;
206
+ let b = c.b;
207
+ return (((("38;2;" + $int.to_string(r)) + ";") + $int.to_string(g)) + ";") + $int.to_string(
208
+ b,
209
+ );
210
+ }
211
+ }
212
+
213
+ function get_bg(c) {
214
+ if (c instanceof Default) {
215
+ return "49";
216
+ } else if (c instanceof Black) {
217
+ return "40";
218
+ } else if (c instanceof Grey) {
219
+ return "100";
220
+ } else if (c instanceof Red) {
221
+ return "41";
222
+ } else if (c instanceof BrightRed) {
223
+ return "101";
224
+ } else if (c instanceof Green) {
225
+ return "42";
226
+ } else if (c instanceof BrightGreen) {
227
+ return "102";
228
+ } else if (c instanceof Yellow) {
229
+ return "43";
230
+ } else if (c instanceof BrightYellow) {
231
+ return "103";
232
+ } else if (c instanceof Blue) {
233
+ return "44";
234
+ } else if (c instanceof BrightBlue) {
235
+ return "104";
236
+ } else if (c instanceof Magenta) {
237
+ return "45";
238
+ } else if (c instanceof BrightMagenta) {
239
+ return "105";
240
+ } else if (c instanceof Cyan) {
241
+ return "46";
242
+ } else if (c instanceof BrightCyan) {
243
+ return "106";
244
+ } else if (c instanceof White) {
245
+ return "47";
246
+ } else if (c instanceof BrightWhite) {
247
+ return "107";
248
+ } else if (c instanceof BrightGrey) {
249
+ return "48;5;7";
250
+ } else if (c instanceof AnsiValue) {
251
+ let v = c.v;
252
+ return "48;5;" + $int.to_string(v);
253
+ } else {
254
+ let r = c.r;
255
+ let g = c.g;
256
+ let b = c.b;
257
+ return (((("48;2;" + $int.to_string(r)) + ";") + $int.to_string(g)) + ";") + $int.to_string(
258
+ b,
259
+ );
260
+ }
261
+ }
262
+
263
+ /**
264
+ * Sets the foreground color of a string. It does not reset the color after applying it.
265
+ * Also see [`on`](style.html#on) to set the background color.
266
+ * Using [`with_on`](style.html#with_on) is prefered to set both the background and foreground colors.
267
+ */
268
+ export function with$(s, c) {
269
+ return ((csi + get_fg(c)) + "m") + s;
270
+ }
271
+
272
+ /**
273
+ * Sets the foreground color of a string. It does not reset the color after applying it.
274
+ * Also see [`with`](style.html#with) to set the foreground color.
275
+ * Using [`with_on`](style.html#with_on) is prefered to set both the background and foreground colors.
276
+ */
277
+ export function on(s, c) {
278
+ return ((csi + get_bg(c)) + "m") + s;
279
+ }
280
+
281
+ /**
282
+ * Sets both the foreground and background colors. It is the prefered way to set them both for one string.
283
+ * Also see [`with`](style.html#with) to set the foreground color and [`on`](style.html#on) to set the background color.
284
+ */
285
+ export function with_on(s, fg, bg) {
286
+ return ((((csi + get_fg(fg)) + ";") + get_bg(bg)) + "m") + s;
287
+ }
288
+
289
+ function get_attributes(loop$a, loop$acc) {
290
+ while (true) {
291
+ let a = loop$a;
292
+ let acc = loop$acc;
293
+ if (a instanceof $Empty) {
294
+ return "";
295
+ } else {
296
+ let $ = a.tail;
297
+ if ($ instanceof $Empty) {
298
+ let attr = a.head;
299
+ if (attr instanceof Bold) {
300
+ return acc + "1";
301
+ } else if (attr instanceof Dim) {
302
+ return acc + "2";
303
+ } else if (attr instanceof Underline) {
304
+ return acc + "4";
305
+ } else if (attr instanceof Italic) {
306
+ return acc + "3";
307
+ } else if (attr instanceof Blinking) {
308
+ return acc + "5";
309
+ } else {
310
+ return acc + "7";
311
+ }
312
+ } else {
313
+ let attr = a.head;
314
+ let rest = $;
315
+ let acc$1 = (() => {
316
+ if (attr instanceof Bold) {
317
+ return acc + "1";
318
+ } else if (attr instanceof Dim) {
319
+ return acc + "2";
320
+ } else if (attr instanceof Underline) {
321
+ return acc + "4";
322
+ } else if (attr instanceof Italic) {
323
+ return acc + "3";
324
+ } else if (attr instanceof Blinking) {
325
+ return acc + "5";
326
+ } else {
327
+ return acc + "7";
328
+ }
329
+ })() + ";";
330
+ loop$a = rest;
331
+ loop$acc = acc$1;
332
+ }
333
+ }
334
+ }
335
+ }
336
+
337
+ /**
338
+ * Applies style to a string.
339
+ */
340
+ export function with_style(s, style) {
341
+ return ((((((csi + get_fg(style.fg)) + ";") + get_bg(style.bg)) + ";") + get_attributes(
342
+ style.attributes,
343
+ "",
344
+ )) + "m") + s;
345
+ }
346
+
347
+ /**
348
+ * Sets [`Attributes`](style.html#Attribute) of a string.
349
+ */
350
+ export function attributes(s, a) {
351
+ return ((csi + get_attributes(a, "")) + "m") + s;
352
+ }
353
+
354
+ /**
355
+ * Makes the string bold and resets this attribute afterwards.
356
+ */
357
+ export function bold(s) {
358
+ return (((csi + "1m") + s) + csi) + "22m";
359
+ }
360
+
361
+ /**
362
+ * Makes the string dim and resets this attribute afterwards.
363
+ */
364
+ export function dim(s) {
365
+ return (((csi + "2m") + s) + csi) + "22m";
366
+ }
367
+
368
+ /**
369
+ * Makes the string italic and resets this attribute afterwards.
370
+ */
371
+ export function italic(s) {
372
+ return (((csi + "3m") + s) + csi) + "23m";
373
+ }
374
+
375
+ /**
376
+ * Makes the string underline and resets this attribute afterwards.
377
+ */
378
+ export function underline(s) {
379
+ return (((csi + "4m") + s) + csi) + "24m";
380
+ }
381
+
382
+ /**
383
+ * Makes the string blinking and resets this attribute afterwards.
384
+ */
385
+ export function blinking(s) {
386
+ return (((csi + "5m") + s) + csi) + "25m";
387
+ }
388
+
389
+ /**
390
+ * Makes the string inverse (swaps background and foreground colors)
391
+ * and resets this attribute afterwards. See [`Color`](style.html#Color).
392
+ */
393
+ export function inverse(s) {
394
+ return (((csi + "7m") + s) + csi) + "27m";
395
+ }
396
+
397
+ /**
398
+ * Resets style (foreground, background and attributes). See [`Style`](style.html#Style).
399
+ */
400
+ export function reset_style(s) {
401
+ return (s + csi) + "39;49;22;23;24;25;27m";
402
+ }
403
+
404
+ /**
405
+ * Sets style. See [`Style`](style.html#Style).
406
+ */
407
+ export function set_style(s) {
408
+ return with_style("", s);
409
+ }
410
+
411
+ /**
412
+ * Resets color of the string. See [`Color`](style.html#Color).
413
+ */
414
+ export function reset_color(s) {
415
+ return (s + csi) + "39;49m";
416
+ }
417
+
418
+ /**
419
+ * Resets foreground of the string. See [`Color`](style.html#Color).
420
+ */
421
+ export function reset_foreground(s) {
422
+ return (s + csi) + "39m";
423
+ }
424
+
425
+ /**
426
+ * Resets background of the string. See [`Color`](style.html#Color).
427
+ */
428
+ export function reset_background(s) {
429
+ return (s + csi) + "49m";
430
+ }
431
+
432
+ /**
433
+ * Resets [`Attributes`](style.html#Attribute) of the string.
434
+ */
435
+ export function reset_attributes(s) {
436
+ return (s + csi) + "22;23;24;25;27m";
437
+ }
438
+
439
+ /**
440
+ * Sets the foreground [`Color`](style.html#Color) to black and
441
+ * resets the color afterwards.
442
+ */
443
+ export function black(s) {
444
+ return (((csi + "30m") + s) + csi) + "39m";
445
+ }
446
+
447
+ /**
448
+ * Sets the foreground [`Color`](style.html#Color) to red and
449
+ * resets the color afterwards.
450
+ */
451
+ export function red(s) {
452
+ return (((csi + "31m") + s) + csi) + "39m";
453
+ }
454
+
455
+ /**
456
+ * Sets the foreground [`Color`](style.html#Color) to bright red and
457
+ * resets the color afterwards.
458
+ */
459
+ export function bright_red(s) {
460
+ return (((csi + "91m") + s) + csi) + "39m";
461
+ }
462
+
463
+ /**
464
+ * Sets the foreground [`Color`](style.html#Color) to green and
465
+ * resets the color afterwards.
466
+ */
467
+ export function green(s) {
468
+ return (((csi + "32m") + s) + csi) + "39m";
469
+ }
470
+
471
+ /**
472
+ * Sets the foreground [`Color`](style.html#Color) to bright green and
473
+ * resets the color afterwards.
474
+ */
475
+ export function bright_green(s) {
476
+ return (((csi + "92m") + s) + csi) + "39m";
477
+ }
478
+
479
+ /**
480
+ * Sets the foreground [`Color`](style.html#Color) to yellow and
481
+ * resets the color afterwards.
482
+ */
483
+ export function yellow(s) {
484
+ return (((csi + "33m") + s) + csi) + "39m";
485
+ }
486
+
487
+ /**
488
+ * Sets the foreground [`Color`](style.html#Color) to bright yellow and
489
+ * resets the color afterwards.
490
+ */
491
+ export function bright_yellow(s) {
492
+ return (((csi + "93m") + s) + csi) + "39m";
493
+ }
494
+
495
+ /**
496
+ * Sets the foreground [`Color`](style.html#Color) to blue and
497
+ * resets the color afterwards.
498
+ */
499
+ export function blue(s) {
500
+ return (((csi + "34m") + s) + csi) + "39m";
501
+ }
502
+
503
+ /**
504
+ * Sets the foreground [`Color`](style.html#Color) to bright blue and
505
+ * resets the color afterwards.
506
+ */
507
+ export function bright_blue(s) {
508
+ return (((csi + "94m") + s) + csi) + "39m";
509
+ }
510
+
511
+ /**
512
+ * Sets the foreground [`Color`](style.html#Color) to magenta and
513
+ * resets the color afterwards.
514
+ */
515
+ export function magenta(s) {
516
+ return (((csi + "35m") + s) + csi) + "39m";
517
+ }
518
+
519
+ /**
520
+ * Sets the foreground [`Color`](style.html#Color) to bright magenta and
521
+ * resets the color afterwards.
522
+ */
523
+ export function bright_magenta(s) {
524
+ return (((csi + "95m") + s) + csi) + "39m";
525
+ }
526
+
527
+ /**
528
+ * Sets the foreground [`Color`](style.html#Color) to cyan and
529
+ * resets the color afterwards.
530
+ */
531
+ export function cyan(s) {
532
+ return (((csi + "36m") + s) + csi) + "39m";
533
+ }
534
+
535
+ /**
536
+ * Sets the foreground [`Color`](style.html#Color) to bright cyan and
537
+ * resets the color afterwards.
538
+ */
539
+ export function bright_cyan(s) {
540
+ return (((csi + "96m") + s) + csi) + "39m";
541
+ }
542
+
543
+ /**
544
+ * Sets the foreground [`Color`](style.html#Color) to white and
545
+ * resets the color afterwards.
546
+ */
547
+ export function white(s) {
548
+ return (((csi + "37m") + s) + csi) + "39m";
549
+ }
550
+
551
+ /**
552
+ * Sets the foreground [`Color`](style.html#Color) to bright white and
553
+ * resets the color afterwards.
554
+ */
555
+ export function bright_white(s) {
556
+ return (((csi + "97m") + s) + csi) + "39m";
557
+ }
558
+
559
+ /**
560
+ * Sets the foreground [`Color`](style.html#Color) to bright grey and
561
+ * resets the color afterwards.
562
+ */
563
+ export function bright_grey(s) {
564
+ return (((csi + "38;5;7m") + s) + csi) + "39m";
565
+ }
566
+
567
+ /**
568
+ * Sets the foreground [`Color`](style.html#Color) to grey and
569
+ * resets the color afterwards.
570
+ */
571
+ export function grey(s) {
572
+ return (((csi + "90m") + s) + csi) + "39m";
573
+ }
574
+
575
+ /**
576
+ * Sets the background [`Color`](style.html#Color) to black
577
+ * and resets it afterwards.
578
+ */
579
+ export function on_black(s) {
580
+ return (((csi + "40m") + s) + csi) + "49m";
581
+ }
582
+
583
+ /**
584
+ * Sets the background [`Color`](style.html#Color) to red
585
+ * and resets it afterwards.
586
+ */
587
+ export function on_red(s) {
588
+ return (((csi + "41m") + s) + csi) + "49m";
589
+ }
590
+
591
+ /**
592
+ * Sets the background [`Color`](style.html#Color) to bright red
593
+ * and resets it afterwards.
594
+ */
595
+ export function on_bright_red(s) {
596
+ return (((csi + "101m") + s) + csi) + "49m";
597
+ }
598
+
599
+ /**
600
+ * Sets the background [`Color`](style.html#Color) to green
601
+ * and resets it afterwards.
602
+ */
603
+ export function on_green(s) {
604
+ return (((csi + "42m") + s) + csi) + "49m";
605
+ }
606
+
607
+ /**
608
+ * Sets the background [`Color`](style.html#Color) to bright green
609
+ * and resets it afterwards.
610
+ */
611
+ export function on_bright_green(s) {
612
+ return (((csi + "102m") + s) + csi) + "49m";
613
+ }
614
+
615
+ /**
616
+ * Sets the background [`Color`](style.html#Color) to yellow
617
+ * and resets it afterwards.
618
+ */
619
+ export function on_yellow(s) {
620
+ return (((csi + "43m") + s) + csi) + "49m";
621
+ }
622
+
623
+ /**
624
+ * Sets the background [`Color`](style.html#Color) to bright yellow
625
+ * and resets it afterwards.
626
+ */
627
+ export function on_bright_yellow(s) {
628
+ return (((csi + "103m") + s) + csi) + "49m";
629
+ }
630
+
631
+ /**
632
+ * Sets the background [`Color`](style.html#Color) to blue
633
+ * and resets it afterwards.
634
+ */
635
+ export function on_blue(s) {
636
+ return (((csi + "44m") + s) + csi) + "49m";
637
+ }
638
+
639
+ /**
640
+ * Sets the background [`Color`](style.html#Color) to bright blue
641
+ * and resets it afterwards.
642
+ */
643
+ export function on_bright_blue(s) {
644
+ return (((csi + "104m") + s) + csi) + "49m";
645
+ }
646
+
647
+ /**
648
+ * Sets the background [`Color`](style.html#Color) to magenta
649
+ * and resets it afterwards.
650
+ */
651
+ export function on_magenta(s) {
652
+ return (((csi + "45m") + s) + csi) + "49m";
653
+ }
654
+
655
+ /**
656
+ * Sets the background [`Color`](style.html#Color) to bright magenta
657
+ * and resets it afterwards.
658
+ */
659
+ export function on_bright_magenta(s) {
660
+ return (((csi + "105m") + s) + csi) + "49m";
661
+ }
662
+
663
+ /**
664
+ * Sets the background [`Color`](style.html#Color) to cyan
665
+ * and resets it afterwards.
666
+ */
667
+ export function on_cyan(s) {
668
+ return (((csi + "46m") + s) + csi) + "49m";
669
+ }
670
+
671
+ /**
672
+ * Sets the background [`Color`](style.html#Color) to bright cyan
673
+ * and resets it afterwards.
674
+ */
675
+ export function on_bright_cyan(s) {
676
+ return (((csi + "106m") + s) + csi) + "49m";
677
+ }
678
+
679
+ /**
680
+ * Sets the background [`Color`](style.html#Color) to white
681
+ * and resets it afterwards.
682
+ */
683
+ export function on_white(s) {
684
+ return (((csi + "47m") + s) + csi) + "49m";
685
+ }
686
+
687
+ /**
688
+ * Sets the background [`Color`](style.html#Color) to bright white
689
+ * and resets it afterwards.
690
+ */
691
+ export function on_bright_white(s) {
692
+ return (((csi + "107m") + s) + csi) + "49m";
693
+ }
694
+
695
+ /**
696
+ * Sets the background [`Color`](style.html#Color) to bright grey
697
+ * and resets it afterwards.
698
+ */
699
+ export function on_bright_grey(s) {
700
+ return (((csi + "48;5;7m") + s) + csi) + "49m";
701
+ }
702
+
703
+ /**
704
+ * Sets the background [`Color`](style.html#Color) to grey
705
+ * and resets it afterwards.
706
+ */
707
+ export function on_grey(s) {
708
+ return (((csi + "100m") + s) + csi) + "49m";
709
+ }
710
+
711
+ /**
712
+ * Sets the foreground [`Color`](style.html#Color) to the given ANSI value
713
+ * and resets it afterwards.
714
+ */
715
+ export function ansi(s, value) {
716
+ return ((((csi + get_fg(new AnsiValue(value))) + "m") + s) + csi) + "39m";
717
+ }
718
+
719
+ /**
720
+ * Sets the background [`Color`](style.html#Color) to the given ANSI value
721
+ * and resets it afterwards.
722
+ */
723
+ export function on_ansi(s, value) {
724
+ return ((((csi + get_bg(new AnsiValue(value))) + "m") + s) + csi) + "49m";
725
+ }
726
+
727
+ /**
728
+ * Sets the foreground [`Color`](style.html#Color) to the given RBG color
729
+ * and resets it afterwards.
730
+ */
731
+ export function rbg(s, r, g, b) {
732
+ return ((((csi + get_fg(new Rgb(r, g, b))) + "m") + s) + csi) + "39m";
733
+ }
734
+
735
+ /**
736
+ * Sets the background [`Color`](style.html#Color) to the given RBG color
737
+ * and resets it afterwards.
738
+ */
739
+ export function on_rbg(s, r, g, b) {
740
+ return ((((csi + get_bg(new Rgb(r, g, b))) + "m") + s) + csi) + "49m";
741
+ }