The Macaw logo, a scarlet macaw in flight

macaw_layers

This software is a very early release, and not ready for general use.

Public home: github.com/dcoai/macaw_layers · Docs: hexdocs.pm

Macaw's document layer (spec/00): the document kernel every declarative value is read through, fragments and stacking, stores and portable bundles, and colors and themes (dco-tek/macaw_compose#56, #94).

ModuleWhat it is
Macaw.Layers.Wordsthe words for the kernel's own fault reasons (limits, URLs, unsafe text, colors, tags, stores), given to macaw_base's Macaw.Base.Fault formatter (spec/01 §3)
Macaw.Layers.Document, Macaw.Layers.Limits, Macaw.Layers.Scana value judged by its type with no encoding (check/2), and the JSON adapter's gates a document from elsewhere is read through, in order: bytes, a scan that stops at a limit, decode, version, migrate and recount (Form.gates/3, Form.read/3) (spec/01 §5)
Macaw.Layers.Form, Macaw.Layers.Tagsthe JSON adapter: the value's map form and JSON form, the codec's exact inverses, and each type's table of $ tags (spec/01 §6)
Macaw.Layers.Fragmentthe fragment-type behavior, compose, stack, explain, kinds and ids (spec/02 §1–§3, §6)
Macaw.Layers.Var, Macaw.Layers.Use, Macaw.Layers.Compositevariables and binding, use sites and masks, composites flattened at deployment (spec/02 §4–§9)
Macaw.Layers.Store, Macaw.Layers.Store.Memorythe store behavior, typed ids and import as a relocation; the default in-memory store (spec/03 §1–§2, §3.3)
Macaw.Layers.Bundlea portable closure of documents, its forms and provenance (spec/03 §3)
Macaw.Layers.Color, Macaw.Layers.Color.Visioncolors, OKLab with gamut mapping, typed colors and their resolution; color-vision simulation (spec/04 §1)
Macaw.Layers.Theme, Macaw.Layers.Theme.Extensionthe theme: the color table, ramps and roles, the style palette, contracts and floors, resolution, the ink, extensions and the profile (spec/04 §2–§4)
Macaw.Layers.Theme.Document, Macaw.Layers.Theme.Sheeta theme as a document, and compiled to a stylesheet of --mw- custom properties (spec/04 §5–§6)

One runtime dependency, macaw_base. From Hex:

{:macaw_layers, "~> 0.6.0"}

Part of Macaw.