release: WRNexusJS 0.3.5

This commit is contained in:
2026-07-24 12:46:44 +05:30
parent 44ba847210
commit c81dedff17
2114 changed files with 65790 additions and 150559 deletions
+20
View File
@@ -357,6 +357,26 @@ page Dashboard {
Pages with no `layout` fall back to a `default` layout if one exists; `layout = "none"`
opts out. Layouts can mount components (nav, theme-toggle) like any page.
**Document layout.** A conventional `app/layouts/document.wrn` is applied outside
the selected page layout and may own `<html>`, `<head>`, `<body>`, and `#app`.
The framework passes `cookies`, `theme`, `language`, `url`, and `pathname` as
SSR props, then safely merges page SEO, global head entries, styles, and scripts:
```wrn
layout Document {
props { cookies = {} theme = "light" language = "en" }
view {
<html data-density="{cookies['density'] || 'default'}">
<head></head>
<body><div id="app"><slot /></div></body>
</html>
}
}
```
Cookie-backed document attributes are present in the first server response, so
CSS can apply before paint instead of correcting the page after hydration.
## API routes
`app/api/hello.ts``/api/hello`: