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