AnsiDoc.ts overview
Since v1.0.0
Exports Grouped by Category
- alignment
- alternative layouts
- annotations
- combinators
- commands
- concatenation
- constructors
- destructors
- filling
- flattening
- instances
- matching
- model
- primitives
- reactive layouts
- refinements
- separation
- utilities
- utils
alignment
align
Signature
declare const align: any
Since v1.0.0
encloseSep
Signature
declare const encloseSep: any
Since v1.0.0
hang
Signature
declare const hang: any
Since v1.0.0
indent
Signature
declare const indent: any
Since v1.0.0
list
Signature
declare const list: any
Since v1.0.0
nest
Signature
declare const nest: any
Since v1.0.0
tupled
Signature
declare const tupled: any
Since v1.0.0
alternative layouts
flatAlt
Signature
declare const flatAlt: any
Since v1.0.0
group
Signature
declare const group: any
Since v1.0.0
union
Signature
declare const union: any
Since v1.0.0
annotations
alterAnnotations
Signature
declare const alterAnnotations: any
Since v1.0.0
annotate
Signature
declare const annotate: any
Since v1.0.0
reAnnotate
Signature
declare const reAnnotate: any
Since v1.0.0
unAnnotate
Signature
declare const unAnnotate: any
Since v1.0.0
combinators
map
Signature
declare const map: any
Since v1.0.0
commands
cursorBackward
Moves the cursor backward by the specified number of columns
(default 1
) relative to the current cursor position.
If the cursor is already at the edge of the screen, this has no effect.
Signature
declare const cursorBackward: (columns?: number) => AnsiDoc
Since v1.0.0
cursorDown
Moves the cursor down by the specified number of lines
(default 1
) relative to the current cursor position.
If the cursor is already at the edge of the screen, this has no effect.
Signature
declare const cursorDown: (lines?: number) => AnsiDoc
Since v1.0.0
cursorForward
Moves the cursor forward by the specified number of columns
(default 1
) relative to the current cursor position.
If the cursor is already at the edge of the screen, this has no effect.
Signature
declare const cursorForward: (columns?: number) => AnsiDoc
Since v1.0.0
cursorHide
Hides the cursor.
Signature
declare const cursorHide: Doc<Ansi>
Since v1.0.0
cursorLeft
Moves the cursor to the first column of the current row.
Signature
declare const cursorLeft: Doc<Ansi>
Since v1.0.0
cursorNextLine
Moves cursor to beginning of the line the specified number of rows down (default 1
).
Signature
declare const cursorNextLine: (rows?: number) => AnsiDoc
Since v1.0.0
cursorPrevLine
Moves cursor to beginning of the line the specified number of rows up (default 1
).
Signature
declare const cursorPrevLine: (rows?: number) => AnsiDoc
Since v1.0.0
cursorRestorePosition
Restores the cursor position, encoding shift state and formatting attributes from the previous save, if any, otherwise resets these all to their defaults.
Signature
declare const cursorRestorePosition: Doc<Ansi>
Since v1.0.0
cursorSavePosition
Saves the cursor position, encoding shift state and formatting attributes.
Signature
declare const cursorSavePosition: Doc<Ansi>
Since v1.0.0
cursorShow
Shows the cursor.
Signature
declare const cursorShow: Doc<Ansi>
Since v1.0.0
cursorUp
Moves the cursor up by the specified number of lines
(default 1
) relative to the current cursor position.
If the cursor is already at the edge of the screen, this has no effect.
Signature
declare const cursorUp: (lines?: number) => AnsiDoc
Since v1.0.0
eraseDown
Clears from the current cursor position to the end of the screen.
The current cursor position does not change.
Signature
declare const eraseDown: Doc<Ansi>
Since v1.0.0
eraseEndLine
Clears from the current cursor position to the end of the current line.
The current cursor position does not change.
Signature
declare const eraseEndLine: Doc<Ansi>
Since v1.0.0
eraseLine
Clears the current line.
The current cursor position does not change.
Signature
declare const eraseLine: Doc<Ansi>
Since v1.0.0
eraseLines
Erase from the current cursor position up the specified amount of rows.
Signature
declare const eraseLines: (rows: number) => AnsiDoc
Since v1.0.0
eraseScreen
Clears the entire screen and move the cursor to the upper left.
Signature
declare const eraseScreen: Doc<Ansi>
Since v1.0.0
eraseStartLine
Clears from the current cursor position to the start of the current line.
The current cursor position does not change.
Signature
declare const eraseStartLine: Doc<Ansi>
Since v1.0.0
eraseUp
Clears from the current cursor position to the beginning of the screen.
The current cursor position does not change.
Signature
declare const eraseUp: Doc<Ansi>
Since v1.0.0
concatenation
cat
Signature
declare const cat: any
Since v1.0.0
catWithLine
Signature
declare const catWithLine: any
Since v1.0.0
catWithLineBreak
Signature
declare const catWithLineBreak: any
Since v1.0.0
catWithSoftLine
Signature
declare const catWithSoftLine: any
Since v1.0.0
catWithSoftLineBreak
Signature
declare const catWithSoftLineBreak: any
Since v1.0.0
catWithSpace
Signature
declare const catWithSpace: any
Since v1.0.0
cats
Signature
declare const cats: any
Since v1.0.0
concatWith
Signature
declare const concatWith: any
Since v1.0.0
hcat
Signature
declare const hcat: any
Since v1.0.0
vcat
Signature
declare const vcat: any
Since v1.0.0
constructors
beep
Play a beeping sound.
Signature
declare const beep: Doc<Ansi>
Since v1.0.0
char
Signature
declare const char: any
Since v1.0.0
cursorMove
Move the cursor position the specified number of rows
and columns
relative to the current cursor position.
If the cursor is already at the edge of the screen in either direction, then additional movement will have no effect.
Signature
declare const cursorMove: (column: number, row?: number) => AnsiDoc
Since v1.0.0
cursorTo
Moves the cursor to the specified row
and column
.
Though the ANSI Control Sequence for Cursor Position is 1
-based, this method takes row and column values starting from 0
and adjusts them to 1
- based values.
Signature
declare const cursorTo: (column: number, row?: number) => AnsiDoc
Since v1.0.0
string
Signature
declare const string: any
Since v1.0.0
text
Signature
declare const text: any
Since v1.0.0
destructors
render
Signature
declare const render: {
(config: AnsiDoc.RenderConfig): (self: AnsiDoc) => string
(self: AnsiDoc, config: AnsiDoc.RenderConfig): string
}
Since v1.0.0
filling
fill
Signature
declare const fill: any
Since v1.0.0
fillBreak
Signature
declare const fillBreak: any
Since v1.0.0
fillCat
Signature
declare const fillCat: any
Since v1.0.0
fillSep
Signature
declare const fillSep: any
Since v1.0.0
flattening
changesUponFlattening
Signature
declare const changesUponFlattening: any
Since v1.0.0
flatten
Signature
declare const flatten: any
Since v1.0.0
instances
Invariant
Signature
declare const Invariant: any
Since v1.0.0
matching
match
Signature
declare const match: any
Since v1.0.0
model
AlreadyFlat
Signature
declare const AlreadyFlat: any
Since v1.0.0
Annotated
Signature
declare const Annotated: any
Since v1.0.0
AnsiDoc (type alias)
Signature
type AnsiDoc = Doc<Ansi>
Since v1.0.0
Cat
Signature
declare const Cat: any
Since v1.0.0
Char
Signature
declare const Char: any
Since v1.0.0
Column
Signature
declare const Column: any
Since v1.0.0
Covariant
Signature
declare const Covariant: any
Since v1.0.0
Doc
Signature
declare const Doc: any
Since v1.0.0
DocTypeId
Signature
declare const DocTypeId: any
Since v1.0.0
DocTypeLambda
Signature
declare const DocTypeLambda: any
Since v1.0.0
Empty
Signature
declare const Empty: any
Since v1.0.0
Fail
Signature
declare const Fail: any
Since v1.0.0
FlatAlt
Signature
declare const FlatAlt: any
Since v1.0.0
Flatten
Signature
declare const Flatten: any
Since v1.0.0
Flattened
Signature
declare const Flattened: any
Since v1.0.0
Line
Signature
declare const Line: any
Since v1.0.0
Nest
Signature
declare const Nest: any
Since v1.0.0
Nesting
Signature
declare const Nesting: any
Since v1.0.0
NeverFlat
Signature
declare const NeverFlat: any
Since v1.0.0
Text
Signature
declare const Text: any
Since v1.0.0
Union
Signature
declare const Union: any
Since v1.0.0
WithPageWidth
Signature
declare const WithPageWidth: any
Since v1.0.0
primitives
backslash
Signature
declare const backslash: any
Since v1.0.0
colon
Signature
declare const colon: any
Since v1.0.0
comma
Signature
declare const comma: any
Since v1.0.0
dot
Signature
declare const dot: any
Since v1.0.0
dquote
Signature
declare const dquote: any
Since v1.0.0
empty
Signature
declare const empty: any
Since v1.0.0
equalSign
Signature
declare const equalSign: any
Since v1.0.0
fail
Signature
declare const fail: any
Since v1.0.0
hardLine
Signature
declare const hardLine: any
Since v1.0.0
langle
Signature
declare const langle: any
Since v1.0.0
lbrace
Signature
declare const lbrace: any
Since v1.0.0
lbracket
Signature
declare const lbracket: any
Since v1.0.0
line
Signature
declare const line: any
Since v1.0.0
lineBreak
Signature
declare const lineBreak: any
Since v1.0.0
lparen
Signature
declare const lparen: any
Since v1.0.0
rangle
Signature
declare const rangle: any
Since v1.0.0
rbrace
Signature
declare const rbrace: any
Since v1.0.0
rbracket
Signature
declare const rbracket: any
Since v1.0.0
rparen
Signature
declare const rparen: any
Since v1.0.0
semi
Signature
declare const semi: any
Since v1.0.0
slash
Signature
declare const slash: any
Since v1.0.0
softLine
Signature
declare const softLine: any
Since v1.0.0
softLineBreak
Signature
declare const softLineBreak: any
Since v1.0.0
space
Signature
declare const space: any
Since v1.0.0
squote
Signature
declare const squote: any
Since v1.0.0
vbar
Signature
declare const vbar: any
Since v1.0.0
reactive layouts
column
Signature
declare const column: any
Since v1.0.0
nesting
Signature
declare const nesting: any
Since v1.0.0
pageWidth
Signature
declare const pageWidth: any
Since v1.0.0
width
Signature
declare const width: any
Since v1.0.0
refinements
isAnnotated
Signature
declare const isAnnotated: any
Since v1.0.0
isCat
Signature
declare const isCat: any
Since v1.0.0
isChar
Signature
declare const isChar: any
Since v1.0.0
isColumn
Signature
declare const isColumn: any
Since v1.0.0
isDoc
Signature
declare const isDoc: any
Since v1.0.0
isEmpty
Signature
declare const isEmpty: any
Since v1.0.0
isFail
Signature
declare const isFail: any
Since v1.0.0
isFlatAlt
Signature
declare const isFlatAlt: any
Since v1.0.0
isLine
Signature
declare const isLine: any
Since v1.0.0
isNest
Signature
declare const isNest: any
Since v1.0.0
isNesting
Signature
declare const isNesting: any
Since v1.0.0
isText
Signature
declare const isText: any
Since v1.0.0
isUnion
Signature
declare const isUnion: any
Since v1.0.0
isWithPageWidth
Signature
declare const isWithPageWidth: any
Since v1.0.0
separation
hsep
Signature
declare const hsep: any
Since v1.0.0
seps
Signature
declare const seps: any
Since v1.0.0
vsep
Signature
declare const vsep: any
Since v1.0.0
utilities
angleBracketed
Signature
declare const angleBracketed: any
Since v1.0.0
curlyBraced
Signature
declare const curlyBraced: any
Since v1.0.0
doubleQuoted
Signature
declare const doubleQuoted: any
Since v1.0.0
parenthesized
Signature
declare const parenthesized: any
Since v1.0.0
punctuate
Signature
declare const punctuate: any
Since v1.0.0
reflow
Signature
declare const reflow: any
Since v1.0.0
singleQuoted
Signature
declare const singleQuoted: any
Since v1.0.0
spaces
Signature
declare const spaces: any
Since v1.0.0
squareBracketed
Signature
declare const squareBracketed: any
Since v1.0.0
surround
Signature
declare const surround: any
Since v1.0.0
textSpaces
Signature
declare const textSpaces: any
Since v1.0.0
words
Signature
declare const words: any
Since v1.0.0
utils
AnsiDoc (namespace)
Since v1.0.0
Compact (interface)
Signature
export interface Compact {
readonly style: "compact"
}
Since v1.0.0
Pretty (interface)
Signature
export interface Pretty {
readonly style: "pretty"
readonly options?: Partial<Omit<AvailablePerLine, "_tag">>
}
Since v1.0.0
Smart (interface)
Signature
export interface Smart {
readonly style: "smart"
readonly options?: Partial<Omit<AvailablePerLine, "_tag">>
}
Since v1.0.0
RenderConfig (type alias)
Signature
type RenderConfig = Compact | Pretty | Smart
Since v1.0.0