PhiaUiDesign.Mcp.SnapshotLayout (phia_ui v0.1.17)

Copy Markdown View Source

Computes approximate bounding boxes from layout properties.

Since PhiaUI Design operates without a browser engine, bounding boxes are estimated from layout direction, gap, padding, and sizing properties. Component defaults are used for leaf nodes without explicit dimensions.

Summary

Functions

Compute approximate layout bounding boxes for the scene.

Functions

execute(scene, params \\ %{})

@spec execute(reference(), map()) :: {:ok, [map()]}

Compute approximate layout bounding boxes for the scene.

Options

  • parent_id — scope to a subtree (nil = entire scene)
  • max_depth — how deep to recurse (default 2)
  • problems_only — only return nodes with detected problems (default false)
  • viewport_width — root container width in px (default 1280)

Returns {:ok, tree} where tree is a list of node bbox maps.