API Reference dstar v#0.1.0

Copy Markdown View Source

Modules

Datastar SSE helpers for Elixir/Phoenix.

Helpers for generating Datastar action expressions and encoding module names.

Shared UI + its event handlers in one module — for drawers, pickers, and other components used across many pages.

Functions for patching and removing DOM elements via SSE.

One module per page: render, event handlers, stream callbacks, and colocated function components.

Assign helpers that work in both halves of a Dstar page module.

Template and handler helpers imported by use Dstar.Page.

The plug behind Dstar.Router.dstar/2. Drives Dstar.Page callbacks

Dynamic event dispatch plug.

Renames a CSRF body param to _csrf_token so that Plug.CSRFProtection can find it.

Router macros for Dstar pages and components.

Server-Sent Event (SSE) connection helpers.

Executes JavaScript on the client via SSE.

Functions for reading and patching Datastar signals via SSE.

Assertions for Dstar SSE responses in Plug.Test / Phoenix.ConnTest tests. Chunked SSE bodies accumulate in conn.resp_body on the test adapter; these helpers parse them back into events.

Opt-in per-tab stream deduplication.

Mix Tasks

Adds a development host to /etc/hosts and generates a browser-trusted development certificate with mkcert, so Datastar SSE streams run over HTTP/2 in dev without certificate warnings.