The editor stack is layered so applications can pick the lowest level that still solves the problem.
| Layer | Depends on | Main responsibility |
|---|---|---|
Svg.Editor.Core |
Svg.Model |
Host-agnostic state such as the active document, outline tree, selected ids, settings, clipboard, and undo/redo history |
Svg.Editor.Svg |
Svg.Editor.Core, Svg.Model, Svg.Skia |
SVG document loading, save/export helpers, properties, layers, patterns, swatches, symbols, styles, and creation tools |
Svg.Editor.Skia |
Svg.Editor.Core, Svg.Editor.Svg, Svg.Model, Svg.Skia |
Bounds math, hit handles, transforms, path editing, align/distribute, and overlay rendering |
Svg.Editor.Avalonia |
Svg.Editor.Core, Svg.Editor.Svg |
Reusable Avalonia panels, property editors, standalone dialog views, and dialog/file-dialog service abstractions |
Svg.Editor.Skia.Avalonia |
Svg.Editor.Avalonia, Svg.Editor.Core, Svg.Editor.Skia, Svg.Editor.Svg, Svg.Controls.Skia.Avalonia |
The interactive SvgEditorSurface and the default SvgEditorWorkspace composition |
Svg.Editor.CoreUse this layer when your host already has its own UI and needs a durable editor session object. SvgEditorSession stores the document reference, current file, title, filter text, selected ids, artboards, outline nodes, settings, clipboard contents, and undo/redo snapshots.
Svg.Editor.SvgThis layer owns document mutation and resource-oriented models. It is the package behind the property inspector, layer browser, pattern list, swatches, symbols, and styles. It also carries SvgDocumentService for open, save, XML round-tripping, and export helpers.
Svg.Editor.SkiaThis layer owns the editing math. SelectionService and PathService handle transforms and editable path points, AlignService handles arrangement commands, and RenderingService draws the editor-only overlays. SvgEditorInteractionController and SvgEditorOverlayRenderer are the public adapter types meant for hosts.
Svg.Editor.AvaloniaThis layer exposes reusable controls and standalone views rather than a monolithic window. The main reusable panels are DocumentOutlineView, ResourceBrowserView, PropertyInspectorView, ToolPaletteView, and StatusBarView. Dialog workflows are abstracted through ISvgEditorDialogService and ISvgEditorFileDialogService.
Svg.Editor.Skia.AvaloniaThis is the highest-level package. SvgEditorSurface extends Avalonia.Svg.Skia.Svg with public overlay and interaction adapters, and SvgEditorWorkspace composes the menu, tool palette, left-side panels, canvas, and property inspector into the same layout used by AvalonDraw.
The reusable workspace is intentionally not the final application shell. Hosts remain responsible for:
WorkspaceTitlePrefix,ResourceAssembly,PreviewRequested,DialogService,FileDialogService.That design keeps the reusable packages independent from any single desktop app policy.
samples/AvalonDraw is now a thin host that:
SvgEditorWorkspace,AvalonDraw,Assets/__tiger.svg document.All reusable editor code now lives under src/Svg.Editor.*.
Svg.Editor.Skia.Avalonia for the complete editor experience inside an Avalonia app.Svg.Editor.Avalonia when you want the panels and dialogs but not the default canvas/workspace.Svg.Editor.Skia when you are building your own interactive surface or canvas control.Svg.Editor.Svg when the task is document/resource mutation without UI.Svg.Editor.Core when you only need common session state and history primitives.