Add <%br= %> jqhtml syntax docs, class override detection, npm update

Document event handler placement and model fetch clarification

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-01-15 10:16:06 +00:00
parent 61f8f058f2
commit 1594502cb2
791 changed files with 7044 additions and 6089 deletions

View File

@@ -522,7 +522,7 @@ For mechanical thinkers who see structure, not visuals. Write `<User_Card>` not
<button class="Save_Button Component btn btn-primary">Save</button>
```
**Interpolation**: `<%= escaped %>` | `<%!= unescaped %>` | `<% javascript %>`
**Interpolation**: `<%= escaped %>` | `<%!= unescaped %>` | `<%br= newlines %>` | `<% javascript %>`
**Conditional Attributes** `<input <% if (this.args.required) { %>required="required"<% } %> />`
**Inline Logic**: `<% this.handler = () => action(); %>` then `@click=this.handler` - No JS file needed for simple components
**Event Handlers**: `@click=this.method` (unquoted) - Methods defined inline or in companion .js
@@ -954,6 +954,8 @@ const user = await User_Model.fetch_or_null(1); // Returns null if not found
Requires `#[Ajax_Endpoint_Model_Fetch]` on the model's `fetch()` method.
**If model lacks fetch()**: Add a `fetch()` method with `#[Ajax_Endpoint_Model_Fetch]` to the model. For framework models (in `system/`), create an override in `rsx/models/`. Do NOT create separate controller endpoints to fetch single records - this duplicates ORM functionality and is an anti-pattern.
Auto-populates enum properties and enables lazy relationship loading.
**If model not available in JS bundle**: STOP and ask the developer. Bundles should include all models they need (`rsx/models` in include paths). Do not create workaround endpoints without approval.