fix: anchor Divi name/id patterns at string end, number-advanced stays unknown, doc wording

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 13:16:20 +02:00
co-authored by Claude Opus 5.5
parent 4356e69bb9
commit c24b91d8a5
8 changed files with 13 additions and 8 deletions
@@ -69,7 +69,10 @@ final class AttrPathIndex
* type still tells them apart reliably. Only used for composite (subName-bearing)
* candidates; a plain path keeps trusting its field component alone (COMPONENT_KINDS),
* so an already more specific kind there (richtext, code, …) is never downgraded to the
* generic "text" dynamicContent commonly names for both.
* generic "text" dynamicContent commonly names for both. number-advanced (e.g. border
* radius) holds an object of corner values and therefore stays unknown. A path that has
* both a plain field and named sub-fields keeps only the sub-field map (the plain field
* then counts as unknown).
*/
private const DYNAMIC_CONTENT_KINDS = [
'text' => 'text',
@@ -77,7 +80,6 @@ final class AttrPathIndex
'image' => 'image',
'color' => 'color',
'number' => 'number',
'number-advanced' => 'number',
];
private const ATTR_NAME_PATTERN = '/^[A-Za-z0-9]+(\.[A-Za-z0-9]+)+$/';
@@ -84,8 +84,9 @@ final class DiviCatalogAbility implements Ability
'type' => 'object',
'description' => 'Bekannter Attributpfad => Feldart (text, richtext, code, url, '
. 'image, color, enum, onoff, number, list, icon), soweit aus den Divi-Metadaten '
. 'ableitbar. Bei einem zusammengesetzten Pfad (mehrere benannte Unterfelder unter '
. 'einem Pfad, z. B. buttonOne.innerContent mit "text" und "linkUrl") ist der Wert '
. 'ableitbar. Bei einem zusammengesetzten Pfad (ein oder mehrere benannte '
. 'Unterfelder unter einem Pfad, z. B. buttonOne.innerContent mit "text" und '
. '"linkUrl") ist der Wert '
. 'stattdessen eine Zuordnung Unterfeld => Feldart, soweit für die einzelnen '
. 'Unterfelder ableitbar. Fehlende Pfade oder Unterfelder gelten als unbekannt.',
],