feat(derive): check form model structure

Add #[slhx::form] for user-authored form models, emit form field metadata into slhx.syms, and require form handlers to accept models that passed generated field compatibility checks.

req: form/001

req: form/004

req: form/006

req: codegen/004
This commit is contained in:
slhx agent
2026-05-25 23:44:43 +02:00
parent 34d6757ccd
commit 274b8e9e55
6 changed files with 423 additions and 16 deletions
+2 -2
View File
@@ -4,12 +4,12 @@
//! here, and import generated resources through `#[slhx::surface]`.
pub use slhx_core::*;
pub use slhx_derive::{app, component, handler, surface};
pub use slhx_derive::{app, component, form, handler, surface};
pub mod prelude {
pub use slhx_core::{
navigate, push, redirect, replace, Atom, BuildFingerprint, CssClass, CssClasses, Effect,
Form, Handle, IntoEffect, KeyedSlot, Slot,
};
pub use slhx_derive::{app, component, handler, surface};
pub use slhx_derive::{app, component, form, handler, surface};
}