nehan
Version:
Html layout engine for paged-media written in Typescript
48 lines (47 loc) • 1.69 kB
TypeScript
import { PropValue, WritingMode, NehanElement } from "./public-api";
export declare type LogicalEdgeDirection = "before" | "end" | "after" | "start";
export declare const LogicalEdgeDirections: LogicalEdgeDirection[];
export declare type PhysicalEdgeDirection = "top" | "right" | "bottom" | "left";
export declare const PhysicalEdgeDirections: PhysicalEdgeDirection[];
export interface LogicalEdgeValue<T> {
before: T;
end: T;
after: T;
start: T;
}
export interface PhysicalEdgeValue<T> {
top: T;
right: T;
bottom: T;
left: T;
}
export declare class PhysicalEdge<T> implements PhysicalEdgeValue<T> {
top: T;
right: T;
bottom: T;
left: T;
constructor(values: PhysicalEdgeValue<T>);
get items(): PropValue<PhysicalEdgeDirection, T>[];
}
export declare class LogicalEdge<T> implements LogicalEdgeValue<T> {
before: T;
end: T;
after: T;
start: T;
constructor(values: LogicalEdgeValue<T>);
static isBlockEdge(direction: LogicalEdgeDirection): boolean;
static isInlineEdge(direction: LogicalEdgeDirection): boolean;
getPhysicalEdgeValue(writingMode: WritingMode): PhysicalEdgeValue<T>;
getPhysicalEdge(writing_mode: WritingMode): PhysicalEdge<T>;
getPropByLogicalDirection(direction: string): string;
get values(): LogicalEdgeValue<T>;
get items(): PropValue<LogicalEdgeDirection, T>[];
}
export declare class LogicalEdgeSize extends LogicalEdge<number> {
static loadDirection(element: NehanElement, prop: string): number;
static get zeroValue(): LogicalEdgeValue<number>;
isZero(): boolean;
clone(): LogicalEdgeSize;
get extent(): number;
get measure(): number;
}