feat: lit/divi-preset-get – Preset mit Einstellungen und Fundstellen lesen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-10-16 17:44:09 +02:00
co-authored by Claude Sonnet 5.5
parent cc20100cbc
commit 341782a34f
4 changed files with 257 additions and 0 deletions
@@ -8,7 +8,9 @@ use Closure;
use LIT\MCP\ChangeLog\ChangeLog;
use LIT\MCP\Integrations\Divi\BlockTree\Parser;
use LIT\MCP\Integrations\Divi\Design\DesignSystemReader;
use LIT\MCP\Integrations\Divi\Design\DesignSystemWriter;
use LIT\MCP\Integrations\Divi\Design\DiviDesignSystemAbility;
use LIT\MCP\Integrations\Divi\Design\DiviPresetGetAbility;
use LIT\MCP\Integrations\Divi\Library\DiviLibraryStore;
use LIT\MCP\Integrations\Divi\Library\DiviRoles;
use LIT\MCP\Integrations\Divi\Library\GlobalEdits;
@@ -57,6 +59,7 @@ final class DiviIntegration implements Integration
private DesignSystemReader $design;
private LibraryAccess $access;
private ThemeBuilderAccess $themeBuilderAccess;
private DesignSystemWriter $designWriter;
/**
* @param (Closure(): bool)|null $libraryWritable Tools-tab gate for writes to library entries
@@ -84,6 +87,7 @@ final class DiviIntegration implements Integration
) {
$this->modules = new DiviModules();
$this->design = new DesignSystemReader();
$this->designWriter = new DesignSystemWriter();
$roles = new DiviRoles();
$this->access = new LibraryAccess(new DiviLibraryStore(), $roles, $libraryWritable, $libraryVisible);
$this->themeBuilderAccess = new ThemeBuilderAccess(
@@ -150,6 +154,7 @@ final class DiviIntegration implements Integration
new DiviReplaceTextAbility($this->schema, $loader, $writer),
new DiviNodeCopyAbility($writer, $loader, $this->diviWritable, $this->libraryInsertable),
new DiviDynamicSourcesAbility($this->schema, new DynamicContentMap(), $this->access->roles()),
new DiviPresetGetAbility($this->designWriter, $this->globalUsages()),
];
}