Commit Graph

25 Commits

Author SHA1 Message Date
slhx agent 56f4db88c4 fix(js): keep standard sse same-origin
Require non-empty data-slhx-sse values at build time and have the standard runtime reject cross-origin EventSource URLs with slhx:sse-error instead of opening an implicit external stream.

req: push/006

req: diagnostics/002
2026-06-01 21:07:14 +02:00
slhx agent 0315044f53 fix(build): reject empty slhx guards
Treat empty static data-slhx-on lists and empty data-slhx-confirm messages as build errors, so authors do not silently disable dispatch or confirmation guards with blank attributes.

req: convention/002

req: convention/004

req: diagnostics/002
2026-06-01 21:01:29 +02:00
slhx agent b98820e819 fix(build): reject unsupported slhx events
Validate static data-slhx-on values against the runtime-supported delegated event set so generated EventName constants cannot imply browser behavior the runtime will never dispatch.

req: convention/002

req: diagnostics/002
2026-06-01 20:48:18 +02:00
slhx agent 44366252f7 fix(build): validate slhx convention values
Reject invalid static data-slhx-policy and timing convention values at build time, so typos fail with author-facing guidance instead of silently falling back or disabling runtime behavior.

req: convention/003

req: convention/005

req: convention/006

req: diagnostics/002
2026-06-01 20:42:39 +02:00
slhx agent cd54dd5cf0 fix(build): reject unknown slhx attributes
Fail fast when templates use misspelled or unsupported data-slhx-* attributes, with guidance to fix the spelling or use non-slhx data-* metadata for app-specific islands.

req: convention/009

req: diagnostics/002
2026-06-01 20:37:54 +02:00
slhx agent 3c4c802731 fix(build): reject slhx selector targeting
Fail fast when templates invent selector-style data-slhx-target or data-slhx-select attributes, and point authors back to generated local slots instead of runtime selector semantics.

req: locality/001

req: locality/002

req: htmx_equivalents/003
2026-06-01 20:33:33 +02:00
slhx agent ba3f40a3f0 feat(build): emit checked param tokens
Generate ParamName constants for handle data parameters so public code can refer to checked param metadata instead of stringly typed names.

req: codegen/003
2026-05-26 01:28:51 +02:00
slhx agent 280464017b feat(build): accept precomputed surface facts
Allow slhx-build callers to feed hemplate SurfaceDocument facts directly, preserving the existing .heml parse fallback while covering the build-from-surface path.

req: surface/008

req: build/001
2026-05-26 01:24:03 +02:00
slhx agent efabd3ff66 feat(build): emit checked component refs
Generate ComponentRef constants for component-scoped APIs, include global component refs only when global_exports(true) is enabled, and document/use the checked component token.

req: component/003
2026-05-26 00:35:59 +02:00
slhx agent 4803d681d2 feat(build): make global exports opt in
Default generated APIs to component-scoped modules and require global_exports(true) for legacy/global slot, handle, class, event, and lowering exports.

req: component/003

req: build/001
2026-05-26 00:23:38 +02:00
slhx agent 5364135c5e feat(build): type generated event constants
Generate EventName constants for data-slhx-on metadata and exercise them through typed event emission in techdemo.

req: codegen/006
2026-05-26 00:09:07 +02:00
slhx agent d67478fe36 test(techdemo): exercise checked form handler path
Add techdemo coverage for #[slhx::form] plus #[slhx::handler] on the generated launch_work form, and ignore the internal __h hidden handle field in generated form metadata.

req: form/001

req: form/004

req: form/006

req: derive_handler/003
2026-05-25 23:57:08 +02:00
slhx agent 274b8e9e55 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
2026-05-25 23:44:43 +02:00
slhx agent c1fb5e986a test(build): cover form contract metadata
Assert that slhx-build lowers Surface form controls into generated FormContract field metadata, including names, control kinds, required flags, and handle-to-form syms.

req: codegen/004

req: form/001
2026-05-25 23:27:16 +02:00
slhx agent 355fc99888 test: harden checked boundary coverage
Use DOM-aware rendered-text inspection for the v0 shell marker check and extend unkeyed h-for validation coverage from slots to handles.

req: test/005

req: scope/001
2026-05-25 23:15:54 +02:00
slhx agent abe39ec750 feat(build): generate event constants
Discover data-slhx-on event names from hemplate Surface inputs and emit generated events modules plus symbol rows without adding runtime trigger semantics.

req: codegen/006
2026-05-25 22:24:50 +02:00
slhx agent d25361d34d feat(derive): check generated handler params
Emit handle_param facts for handled data-* attributes and reject handlers that omit generated param arguments. Cover the generated param boundary with unit and compile-fail tests.

req: derive_handler/001

req: test/003
2026-05-25 22:17:08 +02:00
slhx agent dca26511cc feat(derive): require form parameter for form handles
Emit handle-form facts from slhx-build and have #[slhx::handler] reject generated form handlers that do not accept slhx::Form<_>. Cover the boundary with compile-fail fixtures.

req: form/004

req: form/006

req: test/003
2026-05-25 21:23:37 +02:00
slhx agent fee9762069 feat(style): generate checked class tokens
Add a boring CSS/SCSS class-token surface: slhx-build discovers static class tokens from hemplate/templates/stylesheets and emits generated CssClass constants. Add CssClasses for hemplate +class/view data and migrate techdemo dynamic/effect fragments toward hemplate-owned views with DOM-aware assertions.

req: style/001

req: style/002

req: style/003

req: html_safety/002

req: view/001

req: test/005
2026-05-25 20:48:31 +02:00
slhx agent 5c1dc853d8 fix(runtime): support native user interactions
req: examples/005

req: form/002

req: convention/004

req: dx/008
2026-05-11 08:26:13 +02:00
slhx agent 0a50487a3a feat(build): type generated form handles
req: codegen/003
2026-05-10 23:37:11 +02:00
slhx agent af813edd52 feat(build): inject lowered form handles
req: form/002

req: wire/001
2026-05-10 23:35:46 +02:00
slhx agent 79414fbb39 feat(runtime): lower generated runtime ids
req: wire/001

req: ts/001
2026-05-10 23:04:45 +02:00
slhx agent 3e0ed95490 Build v0 example and SSE slices 2026-05-10 22:26:54 +02:00
slhx agent c4e02db5f8 chore(checkpoint): save current v0 build state 2026-05-10 20:51:22 +02:00