Kida 0.2.2
Named call slots, slot-aware analysis, and circular macro import detection
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
TemplateRuntimeErrorwithK-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 incaller()
Functions invoked via{% call %}can now read:
caller()for default slot contentcaller("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 clearTemplateRuntimeError:
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 forK-TPL-003where macro imports are dynamic.