UNPKG

@npmstuff/argdown-core

Version:

A pluggable parser for the Argdown argumentation syntax

105 lines (104 loc) 2.67 kB
import { IArgdownPlugin, IRequestHandler } from "../IArgdownPlugin"; import { IMapNode } from "../model/model"; import { IArgdownRequest, IArgdownResponse } from "../index"; export interface IRankMap { [key: string]: IRank; } export interface IRank { arguments: string[]; statements: string[]; } export interface IDotSettings { useHtmlLabels?: boolean; graphname?: string; measureLineWidth?: boolean; mapBgColor?: string; group?: { lineWidth?: number; charactersInLine?: number; font?: string; fontSize?: number; bold?: boolean; margin?: string; }; closedGroup?: { lineWidth?: number; charactersInLine?: number; font?: string; fontSize?: number; bold?: boolean; margin?: string; }; statement?: { lineWidth?: number; minWidth?: number; margin?: string; shape?: string; style?: string; title?: { font: string; fontSize: number; bold: boolean; charactersInLine?: number; }; text?: { font: string; fontSize: number; bold: boolean; charactersInLine?: number; }; images?: { position: "top" | "bottom"; padding: number; }; }; argument?: { lineWidth?: number; minWidth?: number; margin?: string; shape?: string; style?: string; title?: { font: string; fontSize: number; bold: boolean; charactersInLine?: number; }; text?: { font: string; fontSize: number; bold: boolean; charactersInLine?: number; }; images?: { position: "top" | "bottom"; padding: number; }; }; edge?: { arrowSize: number; penWidth: number; }; graphVizSettings?: { [name: string]: string; }; sameRank?: IRank[]; } declare module "../index" { interface IArgdownRequest { dot?: IDotSettings; } interface IArgdownResponse { dot?: string; groupCount?: number; } } export declare class DotExportPlugin implements IArgdownPlugin { name: string; defaults: IDotSettings; constructor(config?: IDotSettings); getSettings(request: IArgdownRequest): IDotSettings; prepare: IRequestHandler; run: IRequestHandler; exportNodesRecursive(node: IMapNode, request: IArgdownRequest, response: IArgdownResponse, settings: IDotSettings): string; }