Ryan Hamamura
8aa91c577c
feat: add event types OnSubmit, OnInput, OnFocus, OnBlur, OnMouseEnter, OnMouseLeave, OnScroll, OnDblClick
2026-02-06 10:54:27 -10:00
Ryan Hamamura
6dcd54c88b
fix: clean up leaked contexts on SSE disconnect and add orphan reaper
...
When clients disconnect without beforeunload firing (network drops,
mobile kills, crashes), contexts leaked in the registry permanently.
- Extract cleanupCtx helper for dispose/unregister sequence
- Call cleanupCtx on SSE disconnect (sse.Context().Done())
- Add background reaper for contexts where SSE never connected
- Add ContextTTL config option (default 30s, negative disables)
- Fix inverted condition in devModeRemovePersisted
2026-02-06 10:34:28 -10:00
Ryan Hamamura
11543947bd
feat: add OnKeyDownMap and WithWindow for combined key bindings
...
Add window-scoped keydown dispatching with per-key signal and
preventDefault options. Use comma operator instead of semicolons
in generated ternary expressions to produce valid JavaScript.
2026-02-02 08:57:59 -10:00
Ryan Hamamura
c77ccc0796
chore: rename module to github.com/ryanhamamura/via
...
Update module path and all internal imports to use the new repository location.
2026-01-14 10:47:11 -10:00
Ryan Hamamura
d4b831492e
refactor: simplify Datastar configuration API
...
Flatten DatastarConfig struct into Options (DatastarContent, DatastarPath)
and replace datastarHandlerRegistered bool with sync.Once for thread safety.
2026-01-14 02:01:18 -10:00
Ryan Hamamura
ea7b9ad4a1
feat: add custom Datastar.js configuration support
...
Allow users to provide their own Datastar.js script (e.g., Datastar Pro
or custom builds) via Via's Options configuration. Adds DatastarConfig
struct with Content ([]byte) and Path (string) fields.
2026-01-14 01:47:39 -10:00
Joao Goncalves
6edace647e
fix(via_test): remove signal sync test that was bocking test execution
2025-11-25 22:54:00 -01:00
Joao Goncalves
f5a786730a
fix: check for panics on page registration. Fix header append bug: was appending multiple ctx_id to the header; feat: handle complex signal init values as json; add tests; other small improvemnts
2025-11-17 16:46:33 -01:00
Joao Goncalves
472351d9a5
refactor: simplify signals; small optimizations
2025-11-16 19:53:51 -01:00
Jeff Winkler
e0fa5560ab
Signals fix ( #17 )
...
* Fix signals bug, add test.
* Test
2025-11-16 08:51:04 -01:00
Jeff Winkler
f7b5b24dd5
Script, GH action to check that all go files compile, and any tests pass. ( #16 )
2025-11-15 17:47:49 -01:00
Jeff Winkler
7670926733
Brotli Compression. ( #12 )
...
Co-authored-by: João Gonçalves <joao.goncalves01@gmail.com >
2025-11-13 14:03:45 -01:00