feat: Presets als Stapel, Gruppen-Presets und clear_overrides im Composer

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jan-Niclas Loosen
2026-10-18 16:48:58 +02:00
co-authored by Claude Sonnet 5.5
parent fafa140546
commit be6ca5bee0
13 changed files with 549 additions and 74 deletions
+13 -4
View File
@@ -137,7 +137,7 @@ final class DiviIntegration implements Integration
{
return new DiviContentComposer(
$this->schema,
new DiviComposition($this->modules, $this->design),
$this->composition(),
new DiviSaver(),
$this->design,
$writable
@@ -225,13 +225,22 @@ final class DiviIntegration implements Integration
{
return new ThemeBuilderIntegration(
$this->themeBuilderAccess,
new DiviComposition($this->modules, $this->design),
$this->composition(),
new DiviSaver(),
$this->log,
new DynamicFields($this->schema)
);
}
/**
* The one wiring of the composition for every tool that composes (spec D7): presets and Divi's option groups come
* from the design system writer, so a stack or group preset in any write tool resolves against the live book.
*/
private function composition(): DiviComposition
{
return new DiviComposition($this->modules, $this->design, presetSource: $this->designWriter);
}
private function writer(DiviPageLoader $loader): DiviWriter
{
return new DiviWriter(
@@ -239,7 +248,7 @@ final class DiviIntegration implements Integration
new DiviSaver(),
$this->log,
$this->design,
new DiviComposition($this->modules, $this->design),
$this->composition(),
new GlobalEdits($this->access, $this->globalUsages()),
new ThemeBuilderEdits($this->themeBuilderAccess, fields: new DynamicFields($this->schema)),
new SimilarSections($this->access)
@@ -253,7 +262,7 @@ final class DiviIntegration implements Integration
private function presetComposer(): PresetComposer
{
$composition = new DiviComposition($this->modules, $this->design);
$composition = $this->composition();
return new PresetComposer(
$composition->composer(),