SVGRenderer gains two optional methods, beginElement(id:kind:) and endElement(id:kind:), called around each element as it's rendered. They have default no-op implementations, so existing renderers keep working unchanged. A new public SVGElementKind enum identifies the element type (.rect, .group, .path, …) reported to the hooks.
This lets a renderer react to element boundaries — for example to render or extract only a specific element's subtree by id, to hit-test, or to map drawing output back to its source elements.