docs: publish WRNexusJS 0.5.1 reference

This commit is contained in:
2026-07-29 16:57:25 +05:30
parent 056ff8a8c4
commit a0c0efb1b8
83 changed files with 777 additions and 606 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
# WRNexusJS documentation 0.5.0
# WRNexusJS documentation 0.5.1
Status: Private Developer Preview. This site documents 31 release-aligned packages.
@@ -286,7 +286,7 @@ wrnexus eject <component> # copy a Wire UI component's .wrn into app/compone
# Installed package documentation
The following README files and declarations come from the installed private 0.5.0 release.
The following README files and declarations come from the installed private 0.5.1 release.
## @wrnexus/ai
@@ -2053,8 +2053,8 @@ A file opens with `page <Name>` or `component <Name>` followed by a `{ ... }` bo
- `types { <TypeScript declarations> }` — reusable interfaces and aliases for the current file.
- `props { name: Type = <default> ... }` — typed component props. Omit `= <default>` to make a prop required. Legacy inferred props remain supported.
- `@event name = function` inside `props` — declares a public component event. Emit it from component behavior with `name(detail)` or `$emit("name", detail)`, and consume it with `<Component @name="handler(event)" />`.
- `state <ident>: Type = <expr>` — typed reactive state seeded from a raw JS expression. The annotation is optional for backward compatibility.
- `view { <html> }` — plain HTML with `{expr}` interpolation in text and attributes, hyphenated attributes, boolean attributes, `@event="..."` client bindings, and `<!-- comments -->`. Attribute expressions that reference `state` keep an SSR value and update reactively in the browser.
- `state <ident>: Type = <expr>` — typed reactive state seeded from a raw JS expression, including native array and object literals. The annotation is optional for backward compatibility.
- `view { <html> }` — plain HTML with `{expr}` interpolation in text and attributes, JSX-style component props such as `items={items}`, `items={[...]}`, and `options={{...}}`, hyphenated attributes, boolean attributes, `@event="..."` client bindings, and `<!-- comments -->`. Structured component props are serialized safely for SSR; expressions that reference `state` retain their initial value and update reactively in the browser.
- `seo { key = "value" ... }` — metadata merged into the generated `meta`.
- `style { <raw css> }` — inlined page/component stylesheet (repeatable).
- `functions { <TypeScript> }` — helpers with typed parameters and return values. Types remain in server output and are safely erased from browser behavior code.