Headless named region helpers for shared canvas partitioning.
A region is an ordinary persistent canvas item with a :region capability.
Region-scoped participants carry a region_id; projection and viewport
enforcement then use the region item's world-space bounds as the structural
boundary. The runtime does not assign product meaning to a region.
Summary
Types
First argument accepted by region command helpers.
Functions
Returns the world-space bounds for a region item.
Returns true when an item is fully inside the given region bounds.
Defines a persistent named region and returns the command result.
Defines a persistent named region through the canvas command path.
Returns command tuples that define a persistent named region item.
Finds a region item by item id or by its region capability name.
Returns a LiveView session map for entering a scoped shared region.
Types
@type command() :: {:add_item, :region, map()}
@type command_result() :: LivePanels.Canvas.Command.result()
@type socket() :: Phoenix.LiveView.Socket.t()
@type target() :: LivePanels.Canvas.command_target()
First argument accepted by region command helpers.
Pass a LiveView socket for a standalone command, or a
LivePanels.Canvas.Transaction context inside LivePanels.Canvas.transaction/2.
@type viewport_tile() :: LivePanels.Item.t()
Functions
@spec bounds(LivePanels.Item.t() | nil) :: resolved_bounds() | nil
Returns the world-space bounds for a region item.
@spec contains_item?(resolved_bounds(), LivePanels.Item.t()) :: boolean()
Returns true when an item is fully inside the given region bounds.
Defines a persistent named region and returns the command result.
Defines a persistent named region through the canvas command path.
Returns command tuples that define a persistent named region item.
@spec find(map(), String.t() | atom() | nil) :: LivePanels.Item.t() | nil
Finds a region item by item id or by its region capability name.
@spec participant_session(LivePanels.Item.ref(), keyword() | map()) :: map()
Returns a LiveView session map for entering a scoped shared region.