# Kida 0.2.2 URL: /releases/0.2.2/ Section: releases Tags: release, changelog, slots, components, macros, error-codes Date: 2026-02-18 -------------------------------------------------------------------------------- v0.2.2 Status: Released February 18, 2026. This release improves component composition with named slots and strengthens macro import safety with explicit circular-import detection. Highlights Named slots in {% call %} — Use {% slot name %}...{% end %} inside call blocks and map content to {% slot name %} placeholders in {% def %}. More expressive component APIs — caller() supports default and named slot dispatch (caller("header_actions")). Safer macro imports — Direct and transitive circular imports now raise TemplateRuntimeError with K-TPL-003. Slot-aware compiler/analysis passes — Validation and partial evaluation now walk slot bodies in call blocks. Added Named Slots for Call Blocks Kida now supports named slot blocks within {% call %} for multi-region components: {% def card(title) %} <article> <h2>{{ title }}</h2> <div class="actions">{% slot header_actions %}</div> <div class="body">{% slot %}</div> </article> {% end %} {% call card("Settings") %} {% slot header_actions %}<button>Save</button>{% end %} <p>Body content.</p> {% end %} Existing default-slot usage remains compatible. Changed Slot Dispatch in caller() Functions invoked via {% call %} can now read: caller() for default slot content caller("slot_name") for named slot content This makes it easier to build composable template components without custom context plumbing. Analysis and Optimization Over Slot Bodies Static analysis and partial-evaluation passes now traverse slot bodies in CallBlock, so slot-contained expressions receive the same checks and transformations as top-level call content. Fixed Circular Macro Imports (K-TPL-003) When using {% from "template.html" import macro_name %}, direct and transitive cycles are now detected and reported as a clear TemplateRuntimeError: Code: K-TPL-003 Message: Circular import detected This replaces recursion-driven failures with deterministic, actionable errors. Upgrade Notes No breaking template syntax changes — Existing {% call %} + default slot templates continue to work. Optional migration path — Adopt named slots incrementally where components need multiple insertion regions. Error handling — If you catch TemplateRuntimeError, include code checks for K-TPL-003 where macro imports are dynamic. Links PyPI GitHub Full Changelog -------------------------------------------------------------------------------- Metadata: - Word Count: 318 - Reading Time: 2 minutes