pangu
Version:
Paranoid text spacing for good readability, to automatically insert whitespace between CJK (Chinese, Japanese, Korean) and half-width characters (alphabetical letters, numerical digits and symbols).
18 lines (17 loc) • 579 B
TypeScript
export interface VisibilityDetectorConfig {
enabled: boolean;
commonHiddenPatterns: {
clipRect: boolean;
displayNone: boolean;
visibilityHidden: boolean;
opacityZero: boolean;
heightWidth1px: boolean;
};
}
export declare class VisibilityDetector {
readonly config: VisibilityDetectorConfig;
isElementVisuallyHidden(element: Element): boolean;
shouldSkipSpacingAfterNode(node: Node): boolean;
shouldSkipSpacingBeforeNode(node: Node): boolean;
updateConfig(config: Partial<VisibilityDetectorConfig>): void;
}