Skip to content

feat: SSG hydration support + CLI v2.0.0 references#43

Open
ErickXavier wants to merge 6 commits intomainfrom
feat/compiler
Open

feat: SSG hydration support + CLI v2.0.0 references#43
ErickXavier wants to merge 6 commits intomainfrom
feat/compiler

Conversation

@ErickXavier
Copy link
Copy Markdown
Owner

Summary

  • SSR hydration helpers: Added _hasSSR and _getSSRType in compiled.js and globals.js for SSG hydration detection
  • Hydration skip logic: binding.js, conditionals.js, loops.js, and styling.js now preserve server-rendered DOM during hydration
  • CLI reference updates: Documentation locales updated (prebuildbuild, devserve) for CLI v2.0.0
  • 25 new tests covering SSR hydration helpers and hydration skip behavior
  • Asset reorganization: Logo files moved to docs/assets/; dist bundles removed from version control
  • CHANGELOG: Added 2.0.0 entry

Test plan

  • Verify _hasSSR correctly detects server-rendered elements with data-nojs-ssr attributes
  • Verify _getSSRType returns the correct SSR type string
  • Confirm hydration skip in binding, conditionals, loops, and styling directives
  • Validate all 25 new tests pass (npm test)
  • Check CLI reference links in documentation locales resolve correctly

🤖 Generated with Claude Code

Single-root templates now attach __ctx directly on the root element
instead of wrapping it in a div[display:contents]. This fixes HTML
table semantics (tbody>tr), reduces DOM node count, and eliminates
broken CSS selectors caused by intermediate div elements.

Multi-root templates still use the wrapper div as a grouping host.
…sion support, and documentation

- Extract expression parser into src/parser.js (shared with CLI compiler)
- Add src/compiled.js utility for reading data-nojs-e attributes
- Add NoJS._compiled, NoJS._factories, NoJS._filters to public API
- Add compiled function lookup in all directives (bind, styling, events, conditionals, loops)
- Add factory function support in each/foreach loops
- Add template descriptor shortcut in registry
- Add Proxy set trap write-back to owning context
- Add always-notify on reconciliation for in-place mutations
- Add fine-grained dependency tracking, LIS reorder, DOM write caching
- Add compilation.md docs + compilation.tpl template + i18n keys (5 locales)
- Update marketing claims: "no build step" → "no required build step"
- Update README, index.html, llms.txt, landing/features/faq locales
- All 1349 tests passing
Replace all references to the old Node.js CLI commands with the new
Rust CLI equivalents across docs, templates, and all 5 locale files.
- Add NoJS reference to reactive context proxy (get + has traps)
- Add NoJS to _buildScope() for _execStatement (then, on:click, etc.)
- Pass $el to call directive's then expression for anchor support
- Store NoJS reference via _setNoJS() in globals
- Remove src/directives/dnd.js and related test/docs (moved to Elements)
- Update locales (en/es/pt/it) with compiler and SSG shell/docs strings
- Update cheatsheet, playground engine, and sitemap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant