dreamstack/examples/widget-search.ds
enzotar b0e7de3b2e fix: signal composition — stream derived signals, fix identity check, correct relay routing
- Register derived signals in _signalRegistry so _streamSync includes them
- Auto-sync all signals (source + derived) after flush() recomputes effects
- Fix Object.assign identity check: create new object so signal setter detects changes
- Change _connectStream receiver path from /signal/main to /stream/default
- Initialize stream state with {} instead of null to prevent crashes
- Emit StreamFrom bindings directly without double-wrapping in signal()

Verified: static build shows Count: 9, Doubled: 18 on composition page.
HMR interference with WebSocket connections is a separate issue.
2026-02-25 23:55:05 -08:00

18 lines
508 B
Text

-- Search Widget — standalone, streams its signals
--
-- Run with:
-- dreamstack stream examples/widget-search.ds
let query = ""
let results = ["San Francisco", "San Jose", "San Diego", "Santa Cruz", "Sacramento"]
let filtered = filter(results, (r -> contains(lower(r), lower(query))))
stream search on "ws://localhost:9100" { mode: signal }
view search =
column [
text "🔍 Search"
input "" { bind: query, placeholder: "Type to filter..." }
for item in filtered ->
text item
]