v0.4.5
What's Changed
Added
-
iframe.page_wrapper_classconfig. Set it instyleguide.yamland every page render is wrapped in<div class="…">— the project's structural shell (thepage-wrappersticky-footer flex column /min-h-dvhthat the production layout puts aroundheader + main + footer). Applied tokind: pageonly (never component / doc previews, so the full-height shell can't leak into a small preview), built throughcreate_attribute(same class-escaping contract as the<body>line). Default''renders no wrapper, keeping the package framework-agnostic — Tailwind projects opt in, Bootstrap / custom consumers leave it blank. Completes the production-parity pair withbody_class:body_classreproduces the page's<body>,page_wrapper_classreproduces the wrapper<div>— so a page preview matches production without each consumer hand-wrapping everypage/<name>/styleguide.twig. Flows through the existingiframe.*passthrough (Styleguide → Renderer → render-cell.twig), no PHP changes. -
Per-entry
body_classmetadata. A component / page / doc can declarebody_class: "…"in its front-comment metadata; the render iframe applies it to<body>, merged after the globaliframe.body_classviacreate_attribute({ class: [iframe.body_class, <entry>.body_class] })(empty values dropped — no strayclass=""). Lets a page mirror what its production layout puts on<body>(e.g. a dark brand background from an ACFbody_background_color) instead of wrapping the page body in a styleguide-only<div class="bg-… body-…">. Parsed into the component record (so it also surfaces in/api/*+ the CLI) and threaded throughStyleguide → Renderer → render-cell.twig.
Fixed
- Static analysis & PHP 8.4 deprecations. The typography translation helpers (
_xt/__t/_nt/_nxt) now resolve their underlying Twig function callable through a guarded helper, clearing 9 PHPStan level-8 errors (getFunction()/getCallable()are nullable in Twig's signature) with no behaviour change — the fallback mirrors the identity stubs registered just above. PHPUnit now defines<source>and setsignoreIndirectDeprecations, muting the implicitly-nullable-parameter deprecations emitted by the upstreammundschenk-at/php-typography(its latest release v6.7.0 is the ceiling of our^6.0constraint, so the deprecations are unfixable here); our ownsrc/deprecations still surface.
Pull Requests
- #42 — Per-entry body_class metadata applied to render
- #43 — Clear PHPStan level-8 errors + mute upstream PHP 8.4 deprecations
- #45 — feat: iframe.page_wrapper_class — page-only structural wrapper
Full Changelog: v0.4.4...v0.4.5