Macaw.Template.Stacked (macaw v0.6.0)

Copy Markdown View Source

A template stack, stacked and validated whole (spec/06 §2.4): what Macaw.Template.stack/2 answers.

  • template, the template's name, and layers, the layers' names in stacking order;
  • regions, the regions by name, each a %Macaw.Region{}, and order, their DOM order;
  • layout, :stack or {:areas, options};
  • params, the template's params' values, defaults filled;
  • disclosures, :default or :open;
  • own and print, whether the page's own layer and print are stacked;
  • warnings, each {path, {:undoes, layer}}, a layer setting the template's value back over a lower layer's, at the higher layer's path.

Macaw.Template.explain/1 reads its provenance.

Summary

Types

t()

@type t() :: %Macaw.Template.Stacked{
  disclosures: :default | :open,
  fragments: [{String.t() | atom(), map()}],
  layers: [String.t() | :own | :print],
  layout: :stack | {:areas, map()},
  masks: [map()],
  order: [String.t()],
  own: boolean(),
  params: %{required(String.t()) => term()},
  print: boolean(),
  regions: %{required(String.t()) => Macaw.Region.t()},
  template: String.t(),
  warnings: [Macaw.Base.Fault.t()]
}