package d2lib

Import Path
	github.com/pancsta/d2/d2lib (on go.dev)

Dependency Relation
	imports 22 packages, and imported by one package

Involved Source Files d2.go layout_reuse.go
Package-Level Type Names (only one)
/* sort by: | */
FS is the file system used for resolving imports in the D2 text. Nil disables imports. Callers that accept untrusted input should prefer a filesystem constrained to the intended import root; lib/localfile provides rooted and explicit unrestricted host-filesystem policies. FontFamily controls the font family used for all texts that are not the following: - code - latex - pre-measured (web setting) TODO maybe some will want to configure code font too, but that's much lower priority InputPath string Layout *string LayoutResolver func(engine string) (d2graph.LayoutGraph, error) LayoutReuse allows scenarios and steps whose layout inputs are unchanged to reuse the geometry of their base board. Callers should enable this only when LayoutResolver and RouterResolver return a stable built-in Dagre or ELK configuration for the duration of Compile. It is disabled by default so custom resolvers retain their existing per-board behavior. MaxEdgeExpansion bounds distinct edge-segment and endpoint combinations considered by edge globs. Zero uses the secure compiler default. Explicit edges do not consume this budget. MaxEdgeExpansionWork bounds all endpoint-pair examinations performed by edge globs, including lazy replays. Zero uses the secure compiler default. MaxGlobExpansion bounds work performed by glob matching and materialization. Zero uses the secure compiler default. Explicit source fields are not counted as materialization work. MaxVariableExpansion bounds work added by variable substitutions and the automatic copies they induce. Zero uses the secure compiler default. MeasuredTexts []*d2target.MText MonoFontFamily controls the font family used for code/mono texts RouterResolver func(engine string) (d2graph.RouteEdges, error) Ruler *textmeasure.Ruler UTF16Pos bool 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)
Package-Level Functions (total 2)
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)