- 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.
17 lines
355 B
Text
17 lines
355 B
Text
-- Map Widget — renders a location marker, streams its signals
|
|
--
|
|
-- Run with:
|
|
-- dreamstack stream examples/widget-map.ds --port 9101
|
|
|
|
let lat = 37.7749
|
|
let lng = -122.4194
|
|
let label = "San Francisco"
|
|
|
|
stream map on "ws://localhost:9101" { mode: signal }
|
|
|
|
view map =
|
|
column [
|
|
text "📍 {label}"
|
|
text "Lat: {lat}"
|
|
text "Lng: {lng}"
|
|
]
|