-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v4' I was attempting to use ES2015 modules. It turns out that modules still do not work for browsers and node.js at the same time. The javascript community calls these 'isomorphic' modules, and it is still not possible with the new ECMA modules. It turns out my old solution for that still works so I am reverting to that.
- Loading branch information
Showing
8 changed files
with
606 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
export interface AU_Color { | ||
rgb: number[]; | ||
class_name: string; | ||
} | ||
export interface TextWithAttr { | ||
fg: AU_Color; | ||
bg: AU_Color; | ||
bold: boolean; | ||
text: string; | ||
} | ||
declare enum PacketKind { | ||
EOS = 0, | ||
Text = 1, | ||
Incomplete = 2, | ||
ESC = 3, | ||
Unknown = 4, | ||
SGR = 5, | ||
OSCURL = 6 | ||
} | ||
export interface TextPacket { | ||
kind: PacketKind; | ||
text: string; | ||
url: string; | ||
} | ||
export default class AnsiUp { | ||
VERSION: string; | ||
private ansi_colors; | ||
private palette_256; | ||
private fg; | ||
private bg; | ||
private bold; | ||
private _use_classes; | ||
private _escape_for_html; | ||
private _csi_regex; | ||
private _osc_st; | ||
private _osc_regex; | ||
private _url_whitelist; | ||
private _buffer; | ||
constructor(); | ||
use_classes: boolean; | ||
escape_for_html: boolean; | ||
url_whitelist: {}; | ||
private setup_palettes; | ||
private escape_txt_for_html; | ||
append_buffer(txt: string): void; | ||
get_next_packet(): TextPacket; | ||
ansi_to_html(txt: string): string; | ||
private with_state; | ||
private process_ansi; | ||
transform_to_html(fragment: TextWithAttr): string; | ||
private process_hyperlink; | ||
} | ||
declare function rgx(tmplObj: any, ...subst: any[]): RegExp; | ||
declare function rgxG(tmplObj: any, ...subst: any[]): RegExp; |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es6", | ||
"target": "es5", | ||
"module": "none", | ||
"noEmitOnError": false, | ||
"noEmitOnError": true, | ||
"removeComments": true, | ||
"sourceMap": true, | ||
"declaration": true, | ||
"noImplicitUseStrict": true | ||
"noImplicitUseStrict": true, | ||
"outDir": "dist" | ||
}, | ||
"exclude": [ "node_modules", "dist" ] | ||
} |