package core

Import Path
	github.com/d2lang/elk-go/internal/core (on go.dev)

Dependency Relation
	imports 9 packages, and imported by 18 packages

Involved Source Files codec.go engine.go options.go Package core implements ELK metadata, JSON conversion, and recursive layout. topdown.go
Package-Level Type Names (total 12)
/* sort by: | */
Create func() LayoutProvider Features GraphFeature ID string KnownOptions []string func (*AlgorithmRegistry).Algorithms() []*AlgorithmData func (*AlgorithmRegistry).ByID(id string) *AlgorithmData func (*AlgorithmRegistry).BySuffix(suffix string) *AlgorithmData func (*AlgorithmRegistry).Register(algorithm AlgorithmData) error
(*AlgorithmRegistry) Algorithms() []*AlgorithmData (*AlgorithmRegistry) ByID(id string) *AlgorithmData (*AlgorithmRegistry) BySuffix(suffix string) *AlgorithmData (*AlgorithmRegistry) Register(algorithm AlgorithmData) error func NewAlgorithmRegistry() *AlgorithmRegistry func NewEngine(options *OptionRegistry, algorithms *AlgorithmRegistry) *Engine func github.com/d2lang/elk-go/internal/basic.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/box.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/builtins.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/fixed.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/force.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/layeredlayout.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/mrtree.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/radial.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/random.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/rectpacking.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/spore.Register(registry *AlgorithmRegistry) error func github.com/d2lang/elk-go/internal/stress.Register(registry *AlgorithmRegistry) error
Codec imports ELK JSON into the algorithm graph and transfers computed layout back into the same public graph objects. Options *OptionRegistry Import validates graph references and constructs the native arena. TransferLayout copies all layout output into the public objects imported by the most recent Import call. func NewCodec(options *OptionRegistry) *Codec
Engine applies registered providers recursively across graph hierarchy. Algorithms *AlgorithmRegistry Monitor ProgressMonitor Options *OptionRegistry (*Engine) Layout(model *graph.Model) error func NewEngine(options *OptionRegistry, algorithms *AlgorithmRegistry) *Engine
( GraphFeature) Has(feature GraphFeature) bool func GraphFeature.Has(feature GraphFeature) bool const FeatureClusters const FeatureCompound const FeatureDisconnected const FeatureEdgeLabels const FeatureHyperedges const FeatureInsideSelfLoops const FeatureMultiEdges const FeaturePorts const FeatureSelfLoops
Properties graph.PropertyMap
LayoutProvider lays out one parent node and its children. ( LayoutProvider) Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error *github.com/d2lang/elk-go/internal/box.Provider *github.com/d2lang/elk-go/internal/fixed.Provider *github.com/d2lang/elk-go/internal/force.Provider *github.com/d2lang/elk-go/internal/layeredlayout.Provider *github.com/d2lang/elk-go/internal/mrtree.Provider *github.com/d2lang/elk-go/internal/radial.Provider *github.com/d2lang/elk-go/internal/random.Provider *github.com/d2lang/elk-go/internal/rectpacking.Provider *github.com/d2lang/elk-go/internal/stress.Provider
OptionData describes one layout option and how its JSON spelling is parsed. EnumValues []string Format func(any) string Group string ID string Kind OptionKind LegacyIDs []string MetadataOnly marks UI or programmatic metadata that the headless JSON layout engine preserves but does not interpret during layout. Parse func(string) (any, error) Targets Targets (*OptionData) FormatValue(value any) string (*OptionData) ParseValue(value string) (any, bool) func (*OptionRegistry).ByID(id string) *OptionData func (*OptionRegistry).BySuffix(suffix string) *OptionData func (*OptionRegistry).Options() []*OptionData func (*OptionRegistry).Register(option OptionData) error
const BooleanOption const DoubleOption const EnumOption const EnumSetOption const IntegerOption const ObjectOption const StringOption const UndefinedOption
OptionRegistry is insertion ordered and performs ELK's unique dot-boundary suffix lookup. (*OptionRegistry) ByID(id string) *OptionData (*OptionRegistry) BySuffix(suffix string) *OptionData (*OptionRegistry) Options() []*OptionData (*OptionRegistry) Register(option OptionData) error func NewOptionRegistry() *OptionRegistry func NewCodec(options *OptionRegistry) *Codec func NewEngine(options *OptionRegistry, algorithms *AlgorithmRegistry) *Engine func RegisterCoreOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/basic.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/basicoptions.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/builtins.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/force.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/layered.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/mrtree.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/radial.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/rectpacking.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/spore.RegisterOptions(registry *OptionRegistry) func github.com/d2lang/elk-go/internal/stress.RegisterOptions(registry *OptionRegistry)
ProgressMonitor is deliberately small; providers can report work while callers that do not need progress use NullProgressMonitor. ( ProgressMonitor) Begin(task string, totalWork float64) ( ProgressMonitor) Canceled() bool ( ProgressMonitor) Done() ( ProgressMonitor) Subtask(work float64) ProgressMonitor ( ProgressMonitor) Worked(work float64) func ProgressMonitor.Subtask(work float64) ProgressMonitor func LayoutProvider.Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/box.(*Provider).Layout(model *graph.Model, parent graph.NodeID, _ ProgressMonitor) error func github.com/d2lang/elk-go/internal/fixed.(*Provider).Layout(model *graph.Model, parent graph.NodeID, _ ProgressMonitor) error func github.com/d2lang/elk-go/internal/force.InitialLayout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/force.(*Provider).Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/layeredlayout.(*Provider).Layout(model *basegraph.Model, parent basegraph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/mrtree.(*Provider).Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/radial.(*Provider).Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/random.(*Provider).Layout(model *graph.Model, parent graph.NodeID, _ ProgressMonitor) error func github.com/d2lang/elk-go/internal/rectpacking.(*Provider).Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error func github.com/d2lang/elk-go/internal/stress.(*Provider).Layout(model *graph.Model, parent graph.NodeID, monitor ProgressMonitor) error var NullProgressMonitor
const Edges const Labels const Nodes const Parents const Ports
Package-Level Functions (total 7)
func IsSelfLoop(model *graph.Model, edgeID graph.EdgeID) bool
func NewCodec(options *OptionRegistry) *Codec
func NewEngine(options *OptionRegistry, algorithms *AlgorithmRegistry) *Engine
TranslateSection moves every point in a section by offset.
Package-Level Variables (total 60)
Headless elkjs exposes these UI and programmatic options through knownLayoutOptions, but they do not affect native layout execution.
Core graph semantics consumed by ELK Layered and node micro-layout.