Internal command dispatch and input normalization used by app-facing canvas command modules.
Socket targets dispatch through the mounted runtime command runner. Transaction targets append commands to the transaction preview state, which lets derived commands read the result of earlier staged commands before the transaction commits.
Summary
Types
@type command() :: tuple()
@type result() :: {:ok, target(), LivePanels.Canvas.Command.Meta.t()} | {:error, term(), target(), LivePanels.Canvas.Command.Meta.t()}
@type target() :: Phoenix.LiveView.Socket.t() | LivePanels.Canvas.Transaction.t()