docs(requirements): tighten component rows
Add explicit northstar ring fields to component requirements, split the missing-handler fallback, and shorten overlong macro rows without changing behavior. req: component/001 req: component/002 req: component/003 req: component/004 req: component/005 req: component/006 req: component/007
This commit is contained in:
+9
-6
@@ -252,24 +252,27 @@ client app state framework.
|
||||
## component
|
||||
|
||||
### req: component/001
|
||||
001 The primary authoring unit is a hemplate component plus adjacent Rust handlers. A component owns a template root, generated slots, generated handles, generated form checks, and source spans.
|
||||
0 001 The primary authoring unit is a hemplate component plus adjacent Rust handlers. A component owns a template root, generated slots, generated handles, generated form checks, and source spans. [north_star]
|
||||
|
||||
### req: component/002
|
||||
002 hemx supports colocated layout: `todo_list.heml` beside `todo_list.rs`, with generated APIs namespaced by component to avoid global symbol soup.
|
||||
0 002 hemx supports colocated layout: `todo_list.heml` beside `todo_list.rs`, with generated APIs namespaced by component to avoid global symbol soup. [north_star]
|
||||
|
||||
### req: component/003
|
||||
003 Generated APIs are component-namespaced by default:
|
||||
0 003 Generated APIs are component-namespaced by default. [north_star]
|
||||
`ui::todo_list::todo_row`, `ui::todo_list::create`, `ui::todo_list::new_todo`, and `ui::todo_list::COMPONENT` as a checked `ComponentRef`.
|
||||
Category modules such as `targets`, `handles`, and `forms` remain available for organization/compatibility, while raw slot constants live under `advanced::slots`; global exports (`ui::slots::*`, `ui::handles::*`, `ui::components::*`) are opt-in only.
|
||||
|
||||
### req: component/004
|
||||
004 `#[hemx::surface]` bridges generated code into a user module. Users write `#[hemx::surface] mod ui {}` instead of `include!(concat!(env!("OUT_DIR"), ...))`. hemx-build emits `hemx.generated.rs` which the macro expands in place. No direct `$OUT_DIR` includes in user-authored source.
|
||||
0 004 `#[hemx::surface]` bridges generated code into a user module. Users write `#[hemx::surface] mod ui {}` instead of direct `$OUT_DIR` includes; hemx-build emits `hemx.generated.rs` for the macro to expand in place. [north_star]
|
||||
|
||||
### req: component/005
|
||||
005 An optional `#[hemx::component]` macro may validate that every handle declared in the template Surface has a corresponding `#[hemx::handler]` within the annotated module. This is the only macro with cross-handler visibility inside a single module; it remains strictly local. Missing handlers without `#[hemx::component]` are caught at app mount or test time, not `cargo check`.
|
||||
0 005 Optional `#[hemx::component]` validates that each template Surface handle has a corresponding `#[hemx::handler]` within the annotated module. It is strictly module-local, with cross-handler visibility only inside that module. [north_star]
|
||||
|
||||
### req: component/007
|
||||
0 007 Missing handlers without `#[hemx::component]` are caught at app mount or test time, not `cargo check`. [north_star]
|
||||
|
||||
### req: component/006
|
||||
006 `#[derive(Hemplate)]` structs are natural component boundaries. hemx_build discovers them automatically; no additional configuration is required for most apps.
|
||||
0 006 `#[derive(Hemplate)]` structs are natural component boundaries. hemx_build discovers them automatically; no additional configuration is required for most apps. [north_star]
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user