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).
| Module | What it is |
|---|---|
Macaw.Layers.Words | the 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.Scan | a 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.Tags | the 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.Fragment | the fragment-type behavior, compose, stack, explain, kinds and ids (spec/02 §1–§3, §6) |
Macaw.Layers.Var, Macaw.Layers.Use, Macaw.Layers.Composite | variables and binding, use sites and masks, composites flattened at deployment (spec/02 §4–§9) |
Macaw.Layers.Store, Macaw.Layers.Store.Memory | the store behavior, typed ids and import as a relocation; the default in-memory store (spec/03 §1–§2, §3.3) |
Macaw.Layers.Bundle | a portable closure of documents, its forms and provenance (spec/03 §3) |
Macaw.Layers.Color, Macaw.Layers.Color.Vision | colors, OKLab with gamut mapping, typed colors and their resolution; color-vision simulation (spec/04 §1) |
Macaw.Layers.Theme, Macaw.Layers.Theme.Extension | the 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.Sheet | a 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.