# `StarView.Router`
[🔗](https://github.com/Neophen/star_view/blob/v0.7.0/lib/star_view/router.ex#L1)

Explicit Phoenix routes for optional StarView pages and components.

    import StarView.Router
    scope "/", MyAppWeb do
      star_view "/counter", CounterPage
      star_view_components "/ds"
    end

Events default to POST, preserving the existing controller dispatch boundary.
Select additional CSRF-protected methods with `:event_methods`. Page GET events
require `get_events: true`; component GET events require an explicit module
list, such as `get_events: [ReadOnlyComponent]`. GET handlers must be read-only,
and mutation handlers must still guard their intended method.
Options and method/read-module lists must be literal keyword/list values;
module attributes, variables and sigils are not evaluated as options.

# `star_view`
*macro* 

Routes GET rendering, POST streaming, and POST `/_event/:event` by default.

Options: `event_methods: [:post, :put, :patch, :delete]` selects unsafe event
methods; `get_events: true` explicitly allows read-only GET events for this
page. Aliased scopes expand the page module using Phoenix's normal semantics.

# `star_view_components`
*macro* 

Routes marked component/controller events under `base`, defaulting to POST.

Additional unsafe methods use `:event_methods`. Read-only GET requires
`get_events: [Module, ...]`: only those marked modules are dispatchable on the
GET route. The list follows Phoenix scope aliases. A broad boolean GET opt-in
is rejected so existing marked controllers retain their POST boundary.

