Commit Graph

139 Commits

Author SHA1 Message Date
slhx agent d7462fd011 docs(req): clarify lower-aware generated commands
Keep dx/006 from implying crate-root helpers should bypass generated lowering; the public facade owns generic render while generated view modules own lower-aware slot commands.

req: dx/006
2026-06-02 03:10:32 +02:00
slhx agent ee6045aec5 feat(build): generate keyed view commands
Add lower-aware generated append/prepend/replace helpers for keyed slots, move the v0 keyed todo example off the facade extension trait, and keep beginner examples from importing lower-level render shortcuts.

req: dx/006

req: codegen/002

req: public_api/003

req: examples/003
2026-06-02 03:05:37 +02:00
slhx agent 15809c86a6 feat(build): add lower-aware put helper
Generate ui::put(slot, view) for lower-aware slot HTML updates and move examples/docs/contracts to that ergonomic path instead of hand-composing slot.html(render(...)).

req: dx/006

req: component/003

req: runtime/001

req: examples/003
2026-06-02 02:59:29 +02:00
slhx agent 0ede5eb113 feat(prelude): hide slot render shortcut
Keep the beginner prelude on generated lower-aware render/html paths instead of exposing RenderSlotExt, which can bypass generated runtime metadata.

req: dx/006

req: component/003

req: runtime/001
2026-06-02 01:52:18 +02:00
slhx agent 732e65008e fix(examples): use lower-aware slot html updates
Move canonical examples and docs off direct RenderSlotExt render shortcuts so slot updates use generated render/lowering before HTML replacement, preserving runtime metadata for follow-up interactions.

req: component/003

req: runtime/001

req: dx/006

req: examples/003
2026-06-02 01:48:10 +02:00
slhx agent df4b4cc649 feat(axum): add interaction registry alias
Add an interactions()/on() registration path and move canonical examples off explicit register_handle naming while keeping low-level registry types available underneath.

req: axum_integration/003

req: ceremony/001

req: dx/003

req: examples/003
2026-06-02 00:24:32 +02:00
slhx agent bc7e7881b4 feat(build): lower static fragments as safe html
Add a generated static_fragment helper for include_str!-style prototype fragments and use it in the v0 page assembly path so static lowered .heml no longer needs repeated SafeHtml::trusted plumbing.

req: dx/006

req: html_safety/001

req: html_safety/002

req: component/003
2026-06-01 23:57:19 +02:00
slhx agent 117eb57179 feat(core): join safe html fragments
Let already-safe fragments compose without downgrading to String, and use it in the v0 page assembly example to keep rendered and lowered fragments typed at the boundary.

req: html_safety/001

req: html_safety/002

req: component/003
2026-06-01 23:49:20 +02:00
slhx agent 4e47b470a7 feat(axum): add safe html page composition
Add a SafeHtml PageRequest path for shell/partial composition and migrate examples so rendered hemplate fragments stay typed through the transport boundary instead of round-tripping through unchecked strings.

req: axum_integration/001

req: html_safety/001

req: html_safety/002
2026-06-01 23:45:52 +02:00
slhx agent 60eed5f98f feat(build): add concise lower helper
Generate lower(html) as the short static/prototype fragment lowering helper while keeping lower_html(html) as the compatibility alias, then move the v0 page assembly to the leaner path.

req: dx/006

req: component/003
2026-06-01 23:22:32 +02:00
slhx agent f7d9f820e2 feat(slhx): add concise public render helper
Expose slhx::render(view) as the short SafeHtml composition helper and keep render_html(view) as a compatibility alias, matching generated modules' lean page-building path.

req: dx/006

req: html_safety/002
2026-06-01 23:15:31 +02:00
slhx agent 0d4a643759 feat(build): add concise render helper
Generate render(view) as the short page/fragment composition helper while keeping render_html(view) as an explicit compatibility alias, then move examples to the leaner happy path.

req: component/003

req: dx/006

req: view/001
2026-06-01 23:09:34 +02:00
slhx agent c69eb9932c fix(js): tolerate malformed bootstrap state
Report malformed data-slhx-st with slhx:state-error and continue binding the root with an empty atom store instead of letting state decode failures stop handlers, navigation, or push.

req: state/004

req: state/006

req: runtime/001
2026-06-01 21:35:49 +02:00
slhx agent ad135d81fe fix(build): reject empty slhx navigation hrefs
Treat data-slhx-nav anchors with empty static href values as build errors, preserving progressive navigation instead of letting links depend on JavaScript-only behavior.

req: page_swap/001

req: diagnostics/002
2026-06-01 21:30:29 +02:00
slhx agent 9b3fefbf50 fix(build): reject boost on action elements
Treat data-slhx-boost on anchors and forms as a build error with guidance toward data-slhx-nav or data-slhx-handle, preserving boost as a container convention.

req: page_swap/007

req: diagnostics/002
2026-06-01 21:24:55 +02:00
slhx agent b6aaccf113 fix(build): require href on slhx navigation
Treat static data-slhx-nav anchors without href as build errors so page-swap links preserve progressive navigation when JavaScript is unavailable.

req: page_swap/001

req: diagnostics/002
2026-06-01 21:18:25 +02:00
slhx agent efd4e2f369 fix(build): validate slhx convention placement
Reject data-slhx-nav on non-anchor elements and data-slhx-sse away from its root, so standard conventions keep progressive navigation and root-scoped push semantics instead of silently doing nothing.

req: page_swap/001

req: push/006

req: diagnostics/002
2026-06-01 21:13:04 +02:00
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 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 9d3f70e9fe feat(techdemo): add opaque island bridge
Add a canvas leaf-widget island to the techdemo that receives server snapshots through Effect::event/CustomEvent while keeping slhx core and runtime semantics unchanged.

req: interop/001

req: examples/001

req: examples/005
2026-05-26 07:29:51 +02:00
slhx agent 625f797ff1 docs(requirements): align surface build contract
Clarify that slhx consumes hemplate Surface facts and may request in-process hemplate extraction for simple build scripts, without owning .heml parsing semantics.

req: surface/001

req: surface/008

req: build/001

req: boundary/003
2026-05-26 01:42:22 +02:00
slhx agent e20d356c1d docs(examples): mark page shell html boundaries
Document that remaining SafeHtml use in examples is limited to full-page shell composition of already-rendered hemplate fragments, while effect payloads use render helpers.

req: html_safety/002

req: view/001
2026-05-26 01:34:05 +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 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 21716882ab feat(derive): check form parser availability
Introduce FormValue as the parser-availability bound for #[slhx::form] models, blanket it for FromStr types, and add compile-fail coverage for a form field whose domain type lacks a parser.

req: form/004

req: form/006
2026-05-25 23:48:56 +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 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 00af1017cc docs(requirements): clarify surface generation contract
Align test/002 with the implemented checked boundary: #[slhx::surface] now requires generated slhx.generated.rs while #[slhx::component] remains available for incremental module-local testing.

req: test/002
2026-05-25 22:06:46 +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 9ceea7de94 build(test): benchmark safe concurrency ramps
req: test/004
2026-05-11 10:31:19 +02:00
slhx agent 7a2c5ecae0 build(test): cap verification concurrency
req: test/004
2026-05-11 10:27:09 +02:00
slhx agent 0de4c82a16 test(examples): forbid authored browser javascript
req: examples/005
2026-05-11 08:11:06 +02:00
slhx agent c4e02db5f8 chore(checkpoint): save current v0 build state 2026-05-10 20:51:22 +02:00
slhx agent e0484f8eb6 refactor(REQUIREMENTS): integrate DX ergonomics, component scoping, and build-pipeline fixes
- add golden_path, progressive_disclosure, ceremony, diagnostics,
  view_model, interop, client_local, component, codegen, derive sections
- introduce ResourceRef/ResourceId split, ScopeKey, atom mutability
  and pub/sub distinction, form control ids, 5KB target runtime
- fix build typo, macro policy, htmx boundary, version singleton,
  runtime delegation scope
- strengthen Surface with hemplate-real directives (h-for, h-key, +attr)
- preserve no-!-macros policy, north_star feel: Svelte at call site,
  Rust at boundary

Eval: architecture 9/10, dx 9/10, orthogonality 9/10, suckless 8.5/10
2026-05-10 12:16:02 +02:00
slhx agent 57dc22b8cc feat: integrate 15-point feedback into requirements
- Replace hypothetical @for/@if with real hemplate h-for/h-key/h-if
- Split authoring attrs (data-slhx-*) from runtime attrs (data-hid/data-sid)
- Split ResourceId (compile-time) from ResourceRef (runtime+scope)
- Fix state wording: Effect::set is publish, not subscribe
- Form errors via control ids, not slot ids
- Macro policy: #[slhx::handler] required, optional ergonomic helpers
- Add component/003 (namespaced APIs) and surface/008-010
- Add opt-in content_ids for raw/pre-rendered HTML tracking
- Runtime delegation on root, not document; 5KB target
- Sync/Query effects as external types (SyncEffect/QueryEffect)
- derive_app: no singleton, multiple roots/widgets per process
- hemplate htmx as raw attrs only; migration tool separate
- nav/003: preserve real href links for progressive enhancement
- check/002: honest Rust build model for missing handler checks
2026-05-10 11:54:32 +02:00
tmk241 705ca3c72b feat: codegen section, surface/component macros, proc-macro boundary rules
- build: harden build.rs vs proc-macro responsibilities
- codegen: specify generated slots/handles/forms/atoms APIs
- component: add #[slhx::surface] bridge + optional #[slhx::component]
- enforce: proc-macros are local, side-effect free, never parse .heml
2026-05-10 11:42:56 +02:00
tmk241 bd13d0fa0d feat: slhx requirements, project structure, and core primitives 2026-05-10 11:33:26 +02:00