feat(examples): add flagship techdemo

req: examples/001

req: dx/008

req: form/002

req: page_swap/002

req: push/003
This commit is contained in:
slhx agent
2026-05-11 00:06:42 +02:00
parent 713c6bb087
commit e788c31688
8 changed files with 605 additions and 1 deletions
+34
View File
@@ -0,0 +1,34 @@
#[slhx::surface]
pub mod ui {}
#[cfg(test)]
mod tests {
use super::ui;
use slhx::{IntoEffect, SafeHtml};
use slhx_test::inspect;
// req: examples/001 req: codegen/002 req: public_api/001
#[test]
fn techdemo_uses_generated_slots_for_multi_target_updates() {
fn update() -> impl IntoEffect {
(
ui::control_center::slots::hero_metrics.html(SafeHtml::trusted("<b>fast</b>")),
ui::control_center::slots::notice.text("typed"),
)
}
let batch = inspect(update());
assert!(batch.has_slot(ui::control_center::slots::hero_metrics));
assert!(batch.has_slot(ui::control_center::slots::notice));
}
// req: examples/001 req: form/002 req: codegen/003
#[test]
fn techdemo_exports_form_and_interaction_handles() {
assert_ne!(ui::control_center::handles::launch_work.id().id, ui::control_center::handles::advance_work.id().id);
assert_eq!(
ui::control_center::forms::launch_work.field("title").resource,
ui::control_center::forms::launch_work.id()
);
}
}