import * as _angular_core from '@angular/core'; import { InjectionToken, Provider, Signal, TemplateRef, ElementRef, WritableSignal, Type, Injector } from '@angular/core'; import * as fold_ng from 'fold-ng'; import { FormValueControl, ValidationError, FormCheckboxControl } from '@angular/forms/signals'; /** * `` — the responsive application skeleton. * * A pure structural grid with four content slots: it owns the layout and the * responsive collapse, the app owns what fills the slots (nav, header, routed * content, overlays) and all state/routing. Rail visibility is driven from the * projected rail component itself (an empty `railSecondary` self-collapses). * * Sizing has two ergonomic paths that compose: * - **Typed inputs** (`railWidth`, `headerHeight`, `headerHeightMobile`) for the * common case — plain px numbers, discoverable and type-checked in the * template. * - **CSS variables** for the theming case — set `--fold-shell-*` on any ancestor * to compose tokens (`var(--w-appMenu)`) or drive it from a media query. An * unset input inherits the variable, so the two never fight. * * ``` * ┌────────┬──────────────┬─────────────────────┐ * │ rail │ rail │ header │ ← header row (fixed height) * │ primary│ secondary ├─────────────────────┤ * │ │ │ subheader │ ← optional band (0 when empty) * │ │ ├─────────────────────┤ * │ (auto, │ (auto width, │ content │ ← content row (1fr) * │ self- │ self- │ (position: relative │ * │ sized)│ collapsing) │ anchor for panels) │ * │ │ ├─────────────────────┤ * │ │ │ footer │ ← footer row (auto — 0 when empty) * └────────┴──────────────┴─────────────────────┘ * ``` * * At ≤768px it becomes a single header + content + footer column and the rails * drop out. How the nav comes back is `mobileNav`: * - `"drawer"` (default) — the **primary** rail turns into an off-canvas drawer; * bind `[(mobileNavOpen)]` and give the app a mobile-only hamburger to slide * it in over a scrim (`Escape` / scrim / widening close it). Render the * projected rail expanded in the drawer, since the collapsed icon rail is the * desktop chrome. * - `"none"` — no built-in mobile nav; compose an `fold-nav-launcher` (a * full-screen tile grid) bound to the same `mobileNavOpen`. * * ## Slots * | Attribute | Region | * |------------------|-------------------------------------------| * | `railPrimary` | Left rail (intrinsic width — the rail component sizes itself; `railWidth` sets its base via `--fold-shell-rail-width`). At ≤768px it becomes the mobile drawer (see `mobileNavOpen`). | * | `railSecondary` | Second rail (intrinsic width; a component that collapses to `0` hides itself). | * | `subheader` | The band **under** the header — a nav sub-bar, a filter strip, a context ribbon. Same placement rule as the header (`subheaderLayout`: over the content column, or full width above the rails), and like the footer it is **self-collapsing**: an empty slot claims no row. Rendered as a plain `
`, so the band brings its own semantics (a `