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.Names | names a document declares: strings, never atoms made from data (spec/01 §1) |
Macaw.Layers.Vocabulary | closed vocabularies looked up by spelling (spec/01 §2) |
Macaw.Layers.Fault | the fault {path, reason}, its order, and the one formatter (spec/01 §3) |
Macaw.Layers.Version | one version line per document type, and stepwise migration (spec/01 §4) |
Macaw.Layers.Document, Macaw.Layers.Limits, Macaw.Layers.Scan | the gates a document is read through, in order: bytes, a scan that stops at a limit, decode, version, migrate, validate and recount (spec/01 §5) |
Macaw.Layers.Form, Macaw.Layers.Tags | the value, map and JSON forms, exact inverses, and each type's table of $ tags (spec/01 §6) |
Macaw.Layers.Document.digest/1 | a canonical digest of a document's map form, independent of key order (spec/01 §7) |
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) |
No runtime dependencies. From Hex:
{:macaw_layers, "~> 0.2.2"}Part of Macaw.