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.Namesnames a document declares: strings, never atoms made from data (spec/01 §1)
Macaw.Layers.Vocabularyclosed vocabularies looked up by spelling (spec/01 §2)
Macaw.Layers.Faultthe fault {path, reason}, its order, and the one formatter (spec/01 §3)
Macaw.Layers.Versionone version line per document type, and stepwise migration (spec/01 §4)
Macaw.Layers.Document, Macaw.Layers.Limits, Macaw.Layers.Scanthe 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.Tagsthe value, map and JSON forms, exact inverses, and each type's table of $ tags (spec/01 §6)
Macaw.Layers.Document.digest/1a canonical digest of a document's map form, independent of key order (spec/01 §7)
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)

No runtime dependencies. From Hex:

{:macaw_layers, "~> 0.2.2"}

Part of Macaw.