diagramCoreExtensions top-level property
The basic shapes and port markers, plain text, the grid, the default connector with straight routes, base arrowheads, interaction tools and the core verbs. Every diagram installs them first; an installed extension with the same id replaces one, and another extension's contribution with the same key replaces the core one.
Implementation
final List<DiagramExtension> diagramCoreExtensions = List.unmodifiable([
DiagramExtension(
id: 'vyuh.core.shapes',
shapes: ShapeLibraries.standard.shapes,
portShapes: coreDiagramPortShapes,
tools: _toolsWhere((behavior) => behavior is DiagramShapeTool),
),
DiagramExtension(
id: 'vyuh.core.text',
textTypes: const [PlainTextDefinition()],
tools: _toolsWhere((behavior) => behavior is DiagramTextTool),
),
GridExtension(),
DiagramExtension(
id: 'vyuh.core.connectors',
connectors: const [DiagramConnectorDefinition()],
tools: _toolsWhere((behavior) => behavior is DiagramConnectorTool),
),
DiagramExtension(
id: 'vyuh.core.arrowheads',
arrowheads: coreDiagramArrowheads,
),
DiagramExtension(
id: 'vyuh.core.interaction',
verbs: diagramCoreVerbs,
tools: _toolsWhere(
(behavior) =>
behavior is! DiagramShapeTool &&
behavior is! DiagramTextTool &&
behavior is! DiagramConnectorTool,
),
),
]);