{#- chirp-ui: Shell frame primitives — persistent-region + swap-boundary contract Maps to Chirp's PageComposition model. Use: - shell_outlet_attrs for the canonical boosted-shell HTMX attrs - shell_outlet for the #page-content wrapper used by boosted navigation - shell_region for stable OOB targets (shell_actions, badges, breadcrumbs) Usage: {% from "chirpui/shell_frame.html" import shell_outlet, shell_outlet_attrs, shell_region %}
{% call shell_outlet(include_boost_attrs=false) %} {% block content %}{% end %} {% end %}
{% call shell_outlet() %} {% block content %}{% end %} {% end %}
{% call shell_region(shell_actions_target) %} {{ shell_actions_bar(shell_actions) }} {% end %}
-#} {% def shell_outlet_attrs(target="#main", swap="innerHTML", select="#page-content", sync="auto") %} {% set _sync = (target ~ ":replace") if sync == "auto" else sync %} hx-boost="true" hx-target="{{ target }}" hx-swap="{{ swap }}"{% if select %} hx-select="{{ select }}"{% end %}{% if _sync %} hx-sync="{{ _sync }}"{% end %} {% end %} {% def shell_outlet( id="page-content", cls="", attrs="", attrs_unsafe="", include_boost_attrs=true, target="#main", swap="innerHTML", select="#page-content", sync="auto" ) %} {% set _attrs_raw = attrs_unsafe or (attrs | deprecate_param("attrs", "attrs_unsafe")) %}
{% slot %}
{% end %} {% def shell_region(id, cls="") %}
{% slot %}
{% end %} {% def shell_runtime_script() %} {% end %}