Skip to content

v0.7.0 — Reactivity platform (ClientBackend, setup) + engine flatten

Choose a tag to compare

@paulomtts paulomtts released this 09 Jun 05:18
· 256 commits to master since this release

Turns reactivity into a batteries-included platform — automatic header resolution, single-call setup(), asset modes, cache scopes — and lands a behavior-preserving engine flatten plus one breaking cleanup.

⚠️ Breaking

  • Removed the legacy inline_js / inline_css asset API (#35) — use AssetMode (js_mode / css_mode, set_default_js_mode / set_default_css_mode; AssetMode.NONE disables asset tags).
  • Reactive keyed authoring changed (#32) — instance keys use a PjxLoad-annotated field (stamped data-pjx-load) instead of data-pjx-key / a {{ key }} template var; @mutates takes state keys only; effective_reacts_todepends_on.

✨ Reactivity becomes a platform

  • ClientBackend (#29) — render() resolves the mounted manifest, trigger, and loaded assets from request headers automatically; FastAPIClientBackend wires it via middleware.
  • setup(app, …) (#30) — single-call integration, with REQUEST as the default cache scope.
  • Header-driven runtime (#28) — pjx.js is injected based on the X-PJX-Mounted header instead of a base_layout kwarg.
  • Cls.render(*args) auto-load (#32) — a mutation route just return Cls.render(...); the primary and its OOB dependents load from the backend (+ X-PJX-Trigger). PjxLoad annotated fields replace the ad-hoc key plumbing.
  • Reactive ergonomics (#24) + demo modernization for the new API.

⚡ Assets & caching

  • AssetMode.REFERENCE (#25) — emit hashed <script src> / <link rel=stylesheet> references with dedup, alongside INLINE / NONE.
  • Load-cache scopes (#27) — REQUEST vs PROCESS, with cross-worker invalidation (Redis-backed InvalidationHub).

🧹 Engine flatten + footprint — behavior-preserving (#31, #33, #35)

  • Reorganized into core/ / reactive/ / config/ (#31), then flattened into 16 cohesive top-level modules (#33) — base, renderer, assets, tags, reactive, cache, client, … integrations/ / builtins/ / runtime/ kept as subpackages. Public import surface frozen (__all__ verbatim); net −196 lines.
  • Footprint sweep (#35): frozen AssetPolicy, de-duped load-cache reverse index, dropped template-loader wrappers. Engine 3,564 → 3,450 lines. All Tier-3 features kept (builtins UI kit, REFERENCE assets, PROCESS scope + Redis).

📚 Docs

  • Flat package layout, the setup() / ClientBackend patterns, asset modes, and the removed legacy inline_* API reflected across README, usage tiers, and the Renderer / assets / reactivity docs.

Full changelog: v0.5.2...v0.7.0