@graphty/graph-io / styles / ImporterStyles
Type Alias: ImporterStyles ​
ImporterStyles = {
dialect:StyleDialect;edge?:RawStyleValues;node?:RawStyleValues; } | {block?:string|null;canonical:true;dialect?:StyleDialect|null;edge?:ReaderOutput;graph?:GraphStyle;node?:ReaderOutput;notes?: readonlyStyleNote[];opacityInColor?:boolean;readFrom?: {edge?: readonlystring[];node?: readonlystring[]; };tool?:StyleTool|null;units?:"px"|"relative"; }
Defined in: styles/types.ts:1378
What an importer's styles() returns: the simple path (a dialect and raw values; graph-io does the rest) or the advanced path (canonical values and declared rules).
Union Members ​
Type Literal ​
{ dialect: StyleDialect; edge?: RawStyleValues; node?: RawStyleValues; }
dialect ​
readonlydialect:StyleDialect
How the raw values are spelled.
edge? ​
readonlyoptionaledge?:RawStyleValues
Raw edge values.
node? ​
readonlyoptionalnode?:RawStyleValues
Raw node values.
Type Literal ​
{ block?: string | null; canonical: true; dialect?: StyleDialect | null; edge?: ReaderOutput; graph?: GraphStyle; node?: ReaderOutput; notes?: readonly StyleNote[]; opacityInColor?: boolean; readFrom?: { edge?: readonly string[]; node?: readonly string[]; }; tool?: StyleTool | null; units?: "px" | "relative"; }
block? ​
readonlyoptionalblock?:string|null
The text of a graphty.styles block the file holds in a place of its own (an XML element, an aspect, a comment) rather than as a graph attribute; graph-io reads it exactly as it reads a block carried as a graph attribute.
canonical ​
readonlycanonical:true
Marks the advanced path.
dialect? ​
readonlyoptionaldialect?:StyleDialect|null
How the file spelled its values.
edge? ​
readonlyoptionaledge?:ReaderOutput
Edge output.
graph? ​
readonlyoptionalgraph?:GraphStyle
The graph's own style.
node? ​
readonlyoptionalnode?:ReaderOutput
Node output.
notes? ​
readonlyoptionalnotes?: readonlyStyleNote[]
The reader's notes.
opacityInColor? ​
readonlyoptionalopacityInColor?:boolean
Whether the format writes a node's fill opacity and an edge's opacity as the alpha of its color (rgba(), #RRGGBBAA), so the reader gives an opacity only below 1. In a file graphty wrote, an opaque color then states opacity 1, which overrides a translucent value of the graphty.styles block (another program made the element opaque).
readFrom? ​
readonlyoptionalreadFrom?:object
The data columns the values were read from (a format's own style columns), per target: they hold the styles themselves, so they are not offered to the planner as columns that explain them.
readFrom.edge? ​
readonlyoptionaledge?: readonlystring[]
Edge columns.
readFrom.node? ​
readonlyoptionalnode?: readonlystring[]
Node columns.
tool? ​
readonlyoptionaltool?:StyleTool|null
The program whose defaults apply, or null.
units? ​
readonlyoptionalunits?:"px"|"relative"
The unit of every length.