...
Package d2lib
func Compile(ctx context.Context, input string, compileOpts *CompileOptions, renderOpts *d2svg.RenderOpts) (*d2target.Diagram, *d2graph.Graph, error)
func Parse(ctx context.Context, input string, compileOpts *CompileOptions) (*d2ast.Map, error)
type CompileOptions struct {
UTF16Pos bool
FS fs.FS
MeasuredTexts []*d2target.MText
Ruler *textmeasure.Ruler
RouterResolver func(engine string) (d2graph.RouteEdges, error)
LayoutResolver func(engine string) (d2graph.LayoutGraph, error)
Layout *string
FontFamily *d2fonts.FontFamily
InputPath string
}