[0.1.14] - 2026-03-05
Changed
- Installer now adds the global
/__datastarscope withStreamPlugandNavPlugroutes automatically. Previously this was a manual step. - Installer notice now shows
datastar_sessionusage example.
[0.1.13] - 2026-02-27
Added
- In-session soft navigation via SSE stream (
navigate/2,<.ds_link>,NavPlug) datastar_session/3router macro for grouping Datastar routes under shared session navigation settingsPhoenixDatastar.StreamPlugfor global stream endpoint support (GET /__datastar/stream)PhoenixDatastar.NavPlugfor in-session soft navigation (POST /__datastar/nav)- Signed stream/nav token generation and verification (
StreamToken) PhoenixDatastar.RouteRegistryfor session-aware route matchingnavigate/1,2action helper and<.ds_link navigate="...">component for soft navigation links
Changed
- Live mount now emits global stream URL + signed nav metadata signals (
nav_path,nav_token) - Default HTML wrapper now includes
nav_pathandnav_tokenin framework signals - Cleaned up unused functions
- Improved documentation
- Streamlined test suite
- Live session server supports in-place route transitions via
Server.navigate/5. - Stream token payload now contains only
session_idandsession_name, keeping SSE stream URLs short regardless of params/assigns size. stream_guard/nav_guardoptions ondatastar_sessionare now documented as metadata-only (reserved for future use). Use pipeline plugs for authorization.stream_token_max_ageapplication config option (default: 3600s) controls how long stream/nav tokens remain valid.
[0.1.12] - 2026-02-13
Changed
event/1,2no longer requires assigns — converted from a macro accessingvar!(assigns)to a plain function that emits$session_idand$event_pathDatastar signal references. This meansevent/1,2works in any component regardless of nesting depth, without passingsession_idorevent_paththrough as attributes.DefaultHTMLnow injectsevent_pathalongsidesession_idintodata-signals. Customhtml_moduleimplementations should update theirdata-signalsto includeevent_path(seeDefaultHTMLdocs for the updated example).build_event/4is deprecated in favour ofbuild_event/2.
[0.1.11] - 2026-02-12
Changed
- Consolidated socket construction into
Socket.new/4, eliminating duplication betweenPageControllerandServer. - Stringified
conn.assignskeys in session map for consistentmount/3pattern matching with Plug session keys.
Fixed
- Removed hardcoded "Datastar" from page title.
[0.1.10] - 2026-02-12
Fixed
- Fixed SSE stream and event URLs when using dynamic route segments (e.g.,
/:workspace_slug) by usingconn.request_pathinstead of the compile-time route pattern.
[0.1.9] - 2026-02-11
Changed
- Assigns vs Signals separation: Assigns (
assign/2,3,update/3) are now server-side only and never sent to the client. Signals (put_signal/2,3,update_signal/3) are the explicit API for Datastar reactive state sent via SSE. Client signals arrive in thehandle_event/3payload. - Unified events list: Merged
patchesandscriptssocket fields into a singleeventslist, preserving user-intended ordering. - README overhaul: Fully rewritten to document the assigns/signals separation,
put_signal,update_signal,execute_script,redirect,console_log, and both rendering patterns (signals vs server-rendered patches).
Fixed
- Stateless views now correctly re-run
mount/3beforehandle_event/3so assigns are available. - Compiler now recompiles when a view module changes.
- Fixed stale
@initial_signalsdoc inDefaultHTML.
[0.1.8] - 2026-02-09
Added
- Usage rules: Added
usage-rules.mdfor AI agent integration via theusage_rulespackage.
[0.1.6] - 2026-02-09
Changed
- Simplified scoped alias resolution:
datastar/3now always delegates toPhoenix.Router.scoped_alias/2, matching Phoenix's own convention for controllers. Previously, single-segment vs multi-segment module names were special-cased; now all view modules are treated uniformly. Fully-qualified modules still work as before.
Fixed
live?/1now callsCode.ensure_compiled!/1before inspecting module attributes, preventing false negatives when the module hasn't been loaded yet.- Removed stray "bump" entry from 0.1.5 changelog.
- Updated LICENSE copyright year to 2026.
[0.1.5] - 2026-02-07
Added
- Built-in mount template: The HTML wrapper (
DefaultHTML) is now shipped inside the package. You no longer need to create aDatastarHTMLmodule in your app — it works out of the box. To customize, configurehtml_moduleglobally or per-route (see README). - Installer no longer generates a
DatastarHTMLmodule — the built-inDefaultHTMLis used by default. - Auto-injected initial signals: Assigns set in
mount/3are now automatically initialized as Datastar signals on the wrapper element. No more manually addingdata-signals={Jason.encode!(%{count: @count})}in yourrender/1— justassign(socket, :count, 0)inmount/3and use$countin your template. @initial_signalsassign is now available in custom HTML modules (seeDefaultHTMLdocs).- New tests for initial signal injection and internal assign filtering.
Fixed
event_pathwas leaking as a user signal — added it tointernal_assignsfilter list.
[0.1.3] - 2026-02-04
Added
- Stateless views can now handle events synchronously (no GenServer required).
- New
event/2macro replacespost/2andget/2for triggering server events. event_pathassign is now set for all views (live and stateless).- CSRF token is now read from meta tag automatically (no signal setup required).
Changed
- Breaking: Removed
datastar_events()macro - all event routes are now per-page. - Breaking: Replaced
post/2andget/2macros with singleevent/2macro. - Breaking: Event route path changed from
/path/event/:eventto/path/_event/:event. - Simplified routing -
datastar/3macro now generates event routes for all views. - Installer no longer adds
datastar_events()to router.
Fixed
- Root path "/" now generates correct URLs (was creating double slashes like
//_event).
Removed
- Removed dead
:datastar_updatecode path from SSE loop. - Removed unnecessary
idattribute from DatastarHTML wrapper (was only used by dead code).
[0.1.2] - 2026-02-01
Added
- Installer: adds
datastar/0to my_app_web.ex
Fixed
- conditional check to check if it should stablish a sse connection or not
[0.1.1] - 2026-02-01
Added
- Installer: Created mix installer (
mix phoenix_datastar.install). - Router: Added
PhoenixDatastar.Routerand "sse" option support. - Config: Added option to remove debug annotations.
- Web: Added
:live_sseto_webmodule. - Layout: Added script tag generation for
<head>.
Fixed
- Signals: Fixed prepending of scope.
- Patches: Fix to ensure both patches and signals are sent correctly.