# macaw_layers v0.4.0 - Table of Contents > Macaw's document layer: the document kernel, fragments and stacking, stores and themes. ## Pages - [README](readme.md) - [Changelog](changelog.md) ## Modules - [Macaw.Layers.Bundle](Macaw.Layers.Bundle.md): A portable set of documents (spec/03 §3): the transitive closure of what a page needs, with where it came from, in a map form and a JSON form so it can leave the node it was made on, and imported into another store as a relocation (`Macaw.Layers.Store.relocate/3`). - [Macaw.Layers.Callback](Macaw.Layers.Callback.md): Whether a type module defines an optional callback, loaded or not (spec/01 §9). - [Macaw.Layers.Color](Macaw.Layers.Color.md): Colors (spec/04 §1): parsing, construction in RGB, HSL, Lab, HCL, OKLab and OKLCH, conversion, manipulation and interpolation. - [Macaw.Layers.Color.Form](Macaw.Layers.Color.Form.md): The colors' JSON adapter (spec/04 §1.6, §5): the map form of a literal color and of a color value, for a document type that holds colors to write and read through its `Macaw.Layers.Form` callbacks. Each is a tag, a transform's operands in their own forms, and a theme's pinned steps `$steps` - [Macaw.Layers.Color.Vision](Macaw.Layers.Color.Vision.md): Color-vision simulation: how a color reads to a person with one of the three dichromacies (spec/04 §1.5, visualize D-139). - [Macaw.Layers.Composite](Macaw.Layers.Composite.md): Composites (spec/02 §8): a fragment whose content is a list of use sites and its own variable declarations, stored as structure and flattened at deployment. - [Macaw.Layers.Digest](Macaw.Layers.Digest.md): What the kernel's digest encodes for a struct (spec/01 §7): its **canonical term**. - [Macaw.Layers.Document](Macaw.Layers.Document.md): A document type's validity, judged on its value (spec/01 §5). - [Macaw.Layers.Fault](Macaw.Layers.Fault.md): A fault in a document, `{path, reason}`, and the one formatter that words it (spec/01 §3). - [Macaw.Layers.Form](Macaw.Layers.Form.md): The JSON adapter (spec/01 §5, §6): a document's map form and JSON form, and reading a JSON document through the gates to its value. - [Macaw.Layers.Fragment](Macaw.Layers.Fragment.md): Fragments and stacking (spec/02): the fragment-type behavior, and the operations over fragments of a type. - [Macaw.Layers.Limits](Macaw.Layers.Limits.md): Sanity limits on a document read from elsewhere (spec/01 §5). - [Macaw.Layers.Names](Macaw.Layers.Names.md): Names a document declares (spec/01 §1): a source, a field, a variable, a frame, a style, a fragment's key. - [Macaw.Layers.Scan](Macaw.Layers.Scan.md): The `depth` and `items` limits checked on encoded JSON, before it is decoded (spec/01 §5, gate 2). - [Macaw.Layers.Store](Macaw.Layers.Store.md): Where documents live (spec/03 §1): the store behavior, the assign's functions, typed ids (§2) and import as a relocation (§3.3). - [Macaw.Layers.Store.Memory](Macaw.Layers.Store.Memory.md): The default store, held in memory (spec/03 §1.2): an `Agent` the host starts under its own supervisor, its context the agent. - [Macaw.Layers.Tags](Macaw.Layers.Tags.md): A document type's table of `$` tags (spec/01 §6). - [Macaw.Layers.Theme](Macaw.Layers.Theme.md): The colors, fonts and sizes a page draws with (spec/04 §2, §3). - [Macaw.Layers.Theme.Document](Macaw.Layers.Theme.Document.md): A theme as a document (spec/04 §5): stored and shipped as a value, and judged as one. - [Macaw.Layers.Theme.Extension](Macaw.Layers.Theme.Extension.md): What an adopter registers beyond the library's vocabulary (spec/04 §3.4), so one theme styles it: palette names in a group of the palette, and names of the color table, each with its default, and the words its styles and defaults use, for the theme's JSON reader. - [Macaw.Layers.Theme.Sheet](Macaw.Layers.Theme.Sheet.md): A theme compiled to a stylesheet (spec/04 §6): custom properties scoped by a class, `.mw-theme-`, so every element under that class draws in the theme and a page switches theme by its class alone. Adopters emit the same class and properties, so a visualize chart standalone and on a page reads the same properties. - [Macaw.Layers.Theme.Style](Macaw.Layers.Theme.Style.md): A style node as a fragment type (spec/04 §2.4, spec/02 §1): how the palette stacks one style over another. The root is `:style`, and every key of it is a part, `%{merge: :override, node: :part}`, so a part both nodes give as a map merges key by key, the higher's word at each key, and anything else is the higher's. A part's own keys are unknown to the type, each taken whole. - [Macaw.Layers.Untrusted](Macaw.Layers.Untrusted.md): The checks for untrusted text (spec/01 §8): a string a document holds that is written into CSS, SVG or a page holds only what its context can carry. Each document type says which of its strings these are, and judges them with these checks, so every type refuses the same strings as `{:unsafe, kind}` at their path. - [Macaw.Layers.Url](Macaw.Layers.Url.md): A URL a document holds, a kernel term (spec/01 §8.2): the text as written, and for a template whose host rotates over `{s}`, the subdomains it rotates over. Because a URL is a term of its own, the kernel finds every URL in any document by its type, and a host's policy (`Macaw.Layers.Url.Policy`) judges them all the same way; no document type lists its URL fields. - [Macaw.Layers.Url.Policy](Macaw.Layers.Url.Policy.md): A host's URL policy (spec/01 §8.3): which URLs a document read on this host may use. The host knows where its documents come from and what its pages may load, so the policy is its intent, built once and passed as a value to the reads it makes (`Macaw.Layers.Form.read/3`'s `urls:`). It is never application config, and never part of a document's value: a document is well formed everywhere (`Macaw.Layers.Url`), and allowed or not by the host that reads it. - [Macaw.Layers.Use](Macaw.Layers.Use.md): A use site (spec/02 §7): a fragment used at a position, resolved `ref → local → mask → bind → stack`. - [Macaw.Layers.Var](Macaw.Layers.Var.md): A variable (spec/02 §5): a term allowed wherever a value can appear, carrying only its name, a string. Its default is declared once by the document that uses it, so two fragments cannot disagree about it. A variable is a struct, so it is a leaf of every walk: it stands for a value rather than being one. - [Macaw.Layers.Version](Macaw.Layers.Version.md): One version line per document type, and stepwise migration (spec/01 §4). - [Macaw.Layers.Vocabulary](Macaw.Layers.Vocabulary.md): A closed vocabulary read from a string (spec/01 §2).