"""
Shared s-expression component definitions.

Loaded at app startup via ``load_shared_components()``.  Each component
is defined in an external ``.sx`` file under ``templates/``.
"""

from __future__ import annotations

import os

from .jinja_bridge import load_sx_dir, watch_sx_dir


def load_shared_components() -> None:
    """Register all shared s-expression components."""
    templates_dir = os.path.join(os.path.dirname(__file__), "templates")
    load_sx_dir(templates_dir)
    watch_sx_dir(templates_dir)
