feat(runtime): add tiny trigger timing conventions

Add boring runtime-level trigger timing primitives for delay, revealed, and interval while keeping them as attribute conventions rather than core effects or plugin surfaces. Promote lazy-load, infinite-scroll, progress-bar, value-select, and reset-user-input in examples/html_examples to runnable hemx patterns with exact htmx slugs and generated resources.

req: convention/001

req: convention/003

req: convention/005

req: htmx_equivalents/001

req: htmx_equivalents/002

req: examples/001
This commit is contained in:
slhx agent
2026-06-23 07:51:43 +02:00
parent 0922a46e21
commit cd7f64e5a3
9 changed files with 376 additions and 23 deletions
+17 -1
View File
@@ -1534,8 +1534,11 @@ fn known_hemx_attr(name: &str) -> bool {
| "data-hemx-indicator"
| "data-hemx-confirm"
| "data-hemx-debounce"
| "data-hemx-delay"
| "data-hemx-throttle"
| "data-hemx-every"
| "data-hemx-interval"
| "data-hemx-revealed"
| "data-hemx-disable-while-pending"
| "data-hemx-policy"
| "data-hemx-nav"
@@ -1585,7 +1588,8 @@ fn reject_invalid_hemx_attr_values(path: &Path, attrs: &[SurfaceAttribute]) -> i
"expected a non-empty same-origin SSE URL",
));
}
"data-hemx-debounce" | "data-hemx-throttle" | "data-hemx-every"
"data-hemx-debounce" | "data-hemx-delay" | "data-hemx-throttle" | "data-hemx-every"
| "data-hemx-interval"
if !valid_duration(value) =>
{
return Err(invalid_hemx_value(
@@ -2743,12 +2747,24 @@ fn main() {{
"data-hemx-debounce",
"250ms",
),
(
"delay",
r#"<button data-hemx-handle="save" data-hemx-delay="soon">Save</button>"#,
"data-hemx-delay",
"250ms",
),
(
"every",
r#"<button data-hemx-handle="save" data-hemx-every="1sec">Save</button>"#,
"data-hemx-every",
"1s",
),
(
"interval",
r#"<button data-hemx-handle="save" data-hemx-interval="often">Save</button>"#,
"data-hemx-interval",
"1s",
),
(
"event",
r#"<button data-hemx-handle="save" data-hemx-on="keydown">Save</button>"#,