Rekindle.Phoenix (Rekindle v0.1.7)

Copy Markdown View Source

Connects Rekindle's Web artifacts to a Phoenix endpoint.

The installer adds the development endpoint plug, static delivery, and the selected plugin's Web shell and module script to the Phoenix root layout. web_entry_path/1 selects the development runtime while code reloading is enabled and resolves the production entry module through the application's Phoenix static-path implementation otherwise. web_host/1 and web_style/1 supply the plugin-owned shell when a custom layout needs it.

Summary

Functions

Returns the Web entry module path for a Phoenix endpoint.

Returns the Web host markup declared by a plugin.

Returns the Web shell CSS declared by a plugin.

Types

plugin()

@type plugin() :: Rekindle.Plugin.configured()

Functions

web_entry_path(endpoint)

@spec web_entry_path(module()) :: String.t()

Returns the Web entry module path for a Phoenix endpoint.

During code-reloading development, loading this path as a JavaScript module starts the current development generation and follows successful rebuilds. Otherwise it starts the immutable generation selected by mix rekindle.build web --release.

web_host(plugin)

@spec web_host(plugin()) :: String.t()

Returns the Web host markup declared by a plugin.

GPUI does not require a host element. The built-in egui and Slint plugins return their required canvas elements. Applications can render markup from a trusted configured plugin with Phoenix.HTML.raw/1.

web_style(plugin)

@spec web_style(plugin()) :: String.t()

Returns the Web shell CSS declared by a plugin.

The generated Phoenix layout places this CSS in its document head so the browser target occupies the same application surface as its desktop target.