validation

chirp-ui variant validation — strict mode, warning infrastructure, and registries. When strict mode is enabled (via `set_strict`()), validation warnings escalate to ``ValueError``. In non-strict mode, `_warn`() emits a filterable `ChirpUIValidationWarning` so developers see feedback without crashes. ``VARIANT_REGISTRY``, ``APPEARANCE_REGISTRY``, ``TONE_REGISTRY``, and ``SIZE_REGISTRY`` are derived from the canonical component descriptors in `chirp_ui.components`. Everything not in __all__ is internal and may change without notice.

chirp-ui variant validation — strict mode, warning infrastructure, and registries. When strict mode is enabled (via `set_strict`()), validation warnings escalate to ``ValueError``. In non-strict mode, `_warn`() emits a filterable `ChirpUIValidationWarning` so developers see feedback without crashes. ``VARIANT_REGISTRY``, ``APPEARANCE_REGISTRY``, ``TONE_REGISTRY``, and ``SIZE_REGISTRY`` are derived from the canonical component descriptors in `chirp_ui.components`. Everything not in __all__ is internal and may change without notice.
ChirpUIWarning
class

Base warning for chirp-ui issues.

ChirpUIValidationWarning
class

Invalid input that was silently corrected.

ChirpUIDeprecationWarning
class

Deprecated chirp-ui feature.

set_strict
function

Set strict mode for chirp-ui variant validation. When True, validation warnings escalate to ``ValueError``. When ``"auto"``, reads the ``CHIRP_UI_DEV`` environment variable (truthy values: ``1``, ``true``, ``yes``, ``on``) at call time — so dev hosts opt in once at startup and get strict validation automatically. Chirp calls this per request when use_chirp_ui(app, strict=...) is used.

is_strict
function

Return True when strict mode is active for this context.