wordxml-builder
Version:
Librería TypeScript para construir documentos XML compatibles con Microsoft Word
131 lines (130 loc) • 3.22 kB
TypeScript
/**
* Alineación del texto en un párrafo
*/
export declare enum ParagraphAlignment {
Left = "left",
Center = "center",
Right = "right",
Justify = "justify",
Distributed = "distributed"
}
/**
* Estilo de viñeta o numeración
*/
export declare enum ListStyle {
None = "none",
Bullet = "bullet",
Number = "number",
Decimal = "decimal",
LowerRoman = "lowerRoman",
UpperRoman = "upperRoman",
LowerLetter = "lowerLetter",
UpperLetter = "upperLetter"
}
/**
* Estilo de borde
*/
export declare enum BorderStyle {
None = "none",
Single = "single",
Double = "double",
Dotted = "dotted",
Dashed = "dashed",
DotDash = "dotDash",
DotDotDash = "dotDotDash",
Triple = "triple",
ThinThickSmallGap = "thinThickSmallGap",
ThickThinSmallGap = "thickThinSmallGap",
ThinThickThinSmallGap = "thinThickThinSmallGap",
ThinThickMediumGap = "thinThickMediumGap",
ThickThinMediumGap = "thickThinMediumGap",
ThinThickThinMediumGap = "thinThickThinMediumGap",
ThinThickLargeGap = "thinThickLargeGap",
ThickThinLargeGap = "thickThinLargeGap",
ThinThickThinLargeGap = "thinThickThinLargeGap",
Wave = "wave",
DoubleWave = "doubleWave",
DashSmallGap = "dashSmallGap",
DashDotStroked = "dashDotStroked",
ThreeDEmboss = "threeDEmboss",
ThreeDEngrave = "threeDEngrave",
Outset = "outset",
Inset = "inset"
}
/**
* Configuración de espaciado
*/
export interface Spacing {
before?: number;
after?: number;
line?: number;
lineRule?: 'auto' | 'exact' | 'atLeast';
}
/**
* Configuración de sangría
*/
export interface Indent {
left?: number;
right?: number;
firstLine?: number;
hanging?: number;
}
/**
* Configuración de borde
*/
export interface Border {
style: BorderStyle;
size: number;
color: string;
space: number;
}
/**
* Configuración de bordes del párrafo
*/
export interface ParagraphBorders {
top?: Border;
right?: Border;
bottom?: Border;
left?: Border;
between?: Border;
bar?: Border;
}
/**
* Configuración de sombreado
*/
export interface Shading {
fill: string;
color?: string;
val?: 'clear' | 'solid' | 'pct5' | 'pct10' | 'pct12' | 'pct15' | 'pct20' | 'pct25' | 'pct30' | 'pct35' | 'pct37' | 'pct40' | 'pct45' | 'pct50' | 'pct55' | 'pct60' | 'pct65' | 'pct70' | 'pct75' | 'pct80' | 'pct85' | 'pct87' | 'pct90' | 'pct95';
}
/**
* Configuración de numeración o viñetas
*/
export interface ListFormat {
style: ListStyle;
level?: number;
start?: number;
restart?: boolean;
}
/**
* Configuración completa de un párrafo
*/
export interface ParagraphStyle {
alignment?: ParagraphAlignment;
spacing?: Spacing;
indent?: Indent;
borders?: ParagraphBorders;
shading?: Shading;
listFormat?: ListFormat;
keepLines?: boolean;
keepNext?: boolean;
pageBreakBefore?: boolean;
widowControl?: boolean;
suppressLineNumbers?: boolean;
suppressAutoHyphens?: boolean;
contextualSpacing?: boolean;
mirrorIndents?: boolean;
suppressOverlap?: boolean;
textDirection?: 'lr' | 'rl' | 'tb' | 'bt';
outlineLevel?: number;
}