v0.13.0 (2026-12-02)
Breaking: macaw_component on the family's new packages, all from Hex (dco-tek/macaw/macaw#478). Names that were macaw_layers' or macaw_data's are macaw_base's, macaw_units' or macaw_format's; macaw#478's Renames table lists each.
The family's packages from Hex (#111, dco-tek/macaw/macaw#478 step 9): macaw_base
~> 0.1.1, macaw_layers~> 0.6.0, macaw_data~> 0.21.1, macaw_units~> 0.1.0and macaw_format~> 0.1.0, where they were pinned by git; CI fetches nothing with the job's token.Breaking: macaw_units' and macaw_format's names (#110, #109, dco-tek/macaw/macaw#478 steps 4–5). macaw_component takes macaw_data 6cd29cb (no units or format of its own, macaw_data#469), and macaw_units and macaw_format directly, by git until the family's release. A slot's quantity is one of
Macaw.Units.Quantity.all/0; the render context's locale is a%Macaw.Format.Locale{}and its unit system one ofMacaw.Format.Quantity.systems/0(were macaw_data's). A test keeps every moved name out of lib/ and test/.Breaking: macaw_base's names (#108, #107, dco-tek/macaw/macaw#478 step 3). macaw_component takes macaw_base, macaw_layers (on base, macaw_layers#69) and macaw_data (on base, without layers, macaw_data#467) by git until the family's release. Types that named Macaw.Layers.Fault.t() (
Proxy.digest/1,Conformancechecks and fixtures) nameMacaw.Base.Fault.t(). A route's digest isMacaw.Base.Encoding.digest/1's, byte for byte the same. The kit formats its findings with its own words, then layers' (Macaw.Layers.Words), then the general ones.macaw_data
~> 0.20.1(#106, #105): 0.20.1 formats a measure at its cost before ucum (dco-tek/macaw/macaw_data#458, #459).macaw_data
~> 0.20.0from Hex (#104). 0.20.0 holds no color and reads units throughucum(dco-tek/macaw/macaw_data#447, #441). macaw_component takes it from Hex where it was pinned by git at #447's merge.New: a kit fixture takes
colors, and every context the kit builds carries them (#103, #101, spec/04 §3). The bindings check renames a slot's fields, and the colors' fields follow, so a component that colors a value by the page's colors (Context.color/3) is checked doing so. Colors the context refuses are a kit finding at[:fixtures, i, :colors | path].New: the render context carries the page's colors,
Context.colorsandContext.color/3(#101, #102, spec/02 §2). Data holds no color, so a page or design declares the colors for a field's values (%{field => %{value => color}}), and the host hands them to every cell.Context.color(context, field, value)looks a value up, so the Frame, its Legend and the built-ins color a value alike: the mapping first, then itsstatusrole, then its position.Context.new/1judges the mapping, a non-color being{[:colors, field, value], :not_a_color}. It is a stable field. It is additive: a context without it has%{}.Upgrading: a slot role that reads colors requires
:term, and:coloris no slot type (#99, #100, spec/01 §1.1 and §1.3, dco-tek/macaw/macaw_data#446). macaw_data holds no color now: a column of colors is a:termcolumn. So a slot's types are macaw_data's six::time,:number,:category,:text,:pointand:term. A role requiring:coloris the fault{:unknown_type, :color}; require:term, and check each value as a color withMacaw.Layers.Colorwhere you read it. macaw_data is pinned by git to its main at dco-tek/macaw/macaw_data#447's merge until the release that carries it.macaw_data
~> 0.19.0(#98, #97). macaw_component takes macaw_data 0.19.0 from Hex, the source manager release (dco-tek/macaw/macaw_data#436), so macaw and macaw_live, which take macaw_component by git, resolve Hex macaw_data 0.19.0 with no override. Its suite passes unchanged on 0.19.0.The weekly stress job runs on an image without
ps, and every branch pipeline runs its self-test (#96, #95, dco-tek/macaw/macaw_data#420).ci/stress.exs, re-vendored from the family reference, tells a run's pid from/proc/PID, elseps, else reports that it can't, never crashing; thestress-self-testjob runselixir ci/stress.exs --self-teston the stress job's image in every branch pipeline.New: a render receives the rows its host already holds, the
heldassign (#93, #94, spec/01 §1, spec/02 §1.2, spec/04 §2, for macaw#465). A render that answers its rows as keyed parts,rows: [{key, version, markup}]under ascope(macaw's built-in table), draws every row even when its runtime already holds the markup by{scope, version}. Its runtime now hands it what it holds as an eighth assign,held:nil, or a map%{{scope, version} => iodata}, a value rather than a callback so the render stays a pure function of its assigns. A render may answer a held row's markup in place of drawing it, for its own scope and a version other thannil; givenheld: nilit draws every row and answers the same bytes, so every existing component conforms unchanged.Macaw.Component.Assigns.new/1takesheld, optional andnilwhen left out, and refuses anything butnilor a map as{[:held], :bad_value}. The kit's new:heldcheck renders each kind given the render's own versioned rows (all, and every other one) beside entries it must ignore (a foreign scope, anilversion) and finds:held_differswhere the bytes aren't those ofheld: nil.Macaw.Component.Assigns.keys/0andMacaw.Component.Conformance.checks/0each gain an entry, which breaks code matching their exact lists.New: a row's identity scalar encoded once,
Macaw.Component.Client.row_scalar/1(#91, #92, spec/02 §8.3, for macaw#410). A component that makes a row's value its identity, as macaw's built-in table does (value: v, identity: %{field => v}), had the same scalar encoded twice per row.row_scalar(v)encodes and HTML-escapes a string, number, boolean,nilorDateTimeonce, by the identity rule, and answers an opaque token;row_event/2takes it asvalue:and as a value ofidentity:, and splices its bytes, so the attributes are the bytes the term renders to, which a property holds over generated scalars and identities. Anything else is a wrong call, as is a token nested in a value or given toevent/3.row_event/2now writes an identity pair by pair, which makes the term form cheaper too. Counted 2026-11-18 in reductions, for 1,000 rows each with aDateTimevalue and the same time as a one-key identity: 284,223 by term before, 268,223 by term after, 156,115 by token. With string values and identities, 109,687 by term before, 93,687 after.New: data a placement prepares once, for every render (#89, #90, spec/01 §1, spec/02 §1.1, spec/04 §2, for macaw#411). Any component may define the optional
prepare(settings, context) :: {:ok, data} | {:error, faults}, which a host runs once per placement at validation, and again when the settings or a stable context field change, so a render stops rebuilding the same thing (a number format) from its settings every time. Its data reaches render as a seventh assign,prepared,nilfor a component withoutprepare/2, so every existing component renders unchanged.Macaw.Component.prepare/3dispatches it:{:ok, nil}without the callback,{:ok, data}, the component's own faults, or{:error, [{[], {:bad_prepare, answer}}]}.prepare/2is pure and reads only the settings andMacaw.Component.Context.stable_fields/0(instance,root_font_size,heading_level,theme,preferences,bindings,schemas); a render givenprepared: nilbuilds the data itself and renders the same.Macaw.Component.Assigns.new/1takesprepared, optional andnilwhen left out, andMacaw.Component.Assigns.keys/0answers seven keys. The kit's new:preparedcheck finds{:bad_prepare, faults},:impure_prepare,{:prepare_reads, field}for a field that changes from render to render, and:prepared_differs; every check now renders with the data a host would hand.Macaw.Component.Assigns.keys/0andMacaw.Component.Conformance.checks/0each gain an entry, which breaks code matching their exact lists.New:
Macaw.Component.Context.validated/1, a context from parts a host already judged (#86, #88, spec/02 §2, for macaw#409). A host builds a context for every cell on every render, andMacaw.Component.Context.new/1judges every field it is given each time, a cell's bindings and schemas among them, which the host's own validation already judged.validated/1takes the same keyword list or map and builds the context without judging anything: it trusts its caller, and for valid parts answers the contextnew/1answers, its defaults filled in the same way, which a property holds over any order, either form and a repeated key.new/1keeps its full judgment for everything else, and the conformance kit still builds with it. Counted 2026-11-18 in reductions, for a cell with three slots' bindings and schemas:new/1353,validated/152; given a map, 380 and 89.New: the context carries the selection, so a
:purecomponent draws it (#83, #87, spec/02 §2, spec/04 §2, §3).Macaw.Component.Contextgainsselection, in the shape a contained cell is handed it throughbound/3:nil, or one entry per identity field in name order,%{fields: [field, ...], value: value}. It isnilby default, so every context built without it is the value it was.Macaw.Component.Context.new/1judges it in its one pass and refuses anything else as{[:selection], :not_a_selection}; the context cost gates are unchanged.Macaw.Component.Context.selected?(context, row)answers whether a row holds it: every entry matched by any of its fields, read by either spelling. The kit's new:selectioncheck renders a:purecomponent under a selection (the fixture's newselectionkey, else one the kit makes from the first bound field's first row) with readable, stable output, and underselection: nilas without the field:{:blank_under, {:selection, s}},{:unstable_under, {:selection, s}},{:changed_under, {:selection, nil}}.Macaw.Component.Context.fields/0andMacaw.Component.Conformance.checks/0each gain an entry, which breaks code matching their exact lists.New: one event's attributes for many rows,
Macaw.Component.Client.events/2androw_event/2(#80, #85, spec/02 §8.3). For a component that makes every row of a table or a list emit the same event, as macaw's built-in table does (macaw#382).events(context, name)answers the render's builder, with the instance and the name encoded and escaped once.row_event(events, value: v, identity: id)answers one row's attributes as iodata, the bytesevent/3's attributes render to withPhoenix.HTML.attributes_escape/1, which a property holds over generated values and identities. Per row it builds no payload map, attribute list or whole binary, and validates no options. It refusesevent/3's wrong calls, as aFunctionClauseError, and answers[]in:neutraland:print. The kit's:declarationscheck reads its wire asevent/3's. Counted 2026-11-18 in reductions, for 1,000 rows each with a string value and a one-key identity: 377,690 throughevent/3rendered to a string, 109,771 throughrow_event/2. With aDateTimevalue and identity: 530,007 and 264,091, most of it the time's UTC spelling.event/3is unchanged.Faster:
Macaw.Component.Context.new/1does only the work its given fields need (#79, #84, spec/02 §2). A host builds a context for every cell on every render.new/1now walks what it is given once, judging each given field once as it puts it in, where it built a map of the attributes, took the known fields, built the struct and walked every field again. It evaluatesMacaw.Layers.Theme.default/0only for a valid context given no theme. Counted 2026-11-18 in reductions: given a theme, 205 before and 85 after; given every field, 426 before and 278 after; given a map with a theme, 204 before and 102 after. Every fault is answered as before, and a keyword list that repeats a key is still judged by its last value. A struct or a list that isn't a keyword list is still a wrong call, now aFunctionClauseError.Docs: the spec names libraries, never versions (#47, #76). Versions live in mix.exs and this file, so spec/README.md's status column and spec/00 name none, and a test fails on a library version in spec/, as macaw's does (dco-tek/macaw/macaw#297).
Fixed: the
:bindingscheck doesn't depend on how a component orders its fields (#72, #73, spec/04 §2). The check renamed bound fields to tokensmwbound<i>, and past ten fieldsmwbound10sorts beforemwbound2, so a component that orders its value lists by field name, as macaw_frame's class and ER diagrams do, read as ignoring its binding. Tokens are now padded to one width, so they sort as their fields do, and each element's children are compared as a multiset, never by their order, so a component ordering fields by name however it compares names passes. A component that truly ignores a binding is still{:ignores_binding, slot}.New: a contained value's drawing as raw keyed segments (#70, #71, spec/01 §1, spec/02 §7.6, spec/04 §2). A
:containedcomponent may define the optionalsegments/1, answering{token, [{key, token, iodata}]}: its drawing's token and its segments in drawing order, each the segment's key, the token of the drawing it last changed in and its bytes, raw. A runtime with a socket streams the bytes as binary frames in place of the base64 the render carries (macaw_live 05 §9).Macaw.Component.segments/2answers{:ok, drawing},:nonefor a component without it, or{:error, {:segments, faults}}, every fault of a malformed answer at once, and refuses a:purecomponent as the transitions do. The kit's:containedcheck asks a component exporting it for a drawing, the same for equal values, that each kind's socketless render carries in its stream element:{:bad_segments, faults},:impure_segments,{:no_stream, kind},{:streams, kind, n},{:stream_token, rendered, answered},{:stream_keys, rendered, answered}and{:stream_segment, key, field}. A component withoutsegments/1sees no change.New: an inline component, and the visual set's phrasing-content rule (#67, #69, spec/01 §1, spec/02 §5.1, spec/04 §4).
use Macaw.Componenttakesinline: truefor a component that renders phrasing content, one that sits in a line of text, a table cell or a stat, as macawframe's Sparkline does; it isfalseby default, and anything but a boolean is refused at compile time. It is a static declaration rather than a kind, since phrasing content is a content model any kind's output may have. For an inline component the visual set's:tablecheck asks for no block element in the render,{:block_element, el}, and:tab_stopfor no interactive descendant,{:interactive, el}, both in every mode, in place of a table and one tab stop; its data reaches a reader through its image's name and summary, which:imagechecks as before. A component not declared inline is checked as before. `_component/0andMacaw.Component.info/1answerinline`, which breaks code matching their exact map.Fixed: the
:bindingscheck's renamed delivery names the renamed schema (#66, #68, spec/04 §3). Renaming a slot's fields renames its schema, whose version changes with them; the renamed delivery kept the old version, so a component that checks a delivery's version against its slot's schema, as macaw_frame's Frame does, drew invalid in the renamed render and failed{:ignores_binding, slot}on a correct implementation. A delivery that names the given schema's version now names the renamed schema's; one that names another version, or none, keeps what it names. A fixture can give its deliveries schema versions.New: the context's preferences carry the viewer's locale (#64, #65, spec/02 §2, spec/04 §2).
preferencesgainslocale, a%Macaw.Data.Format.Locale{}, besideunits, so a component writes numbers, currencies and names in the viewer's locale throughMacaw.Data.Format. Preferences that leave it out carryMacaw.Data.Format.Locale.english(), so a host that chooses none and a component that ignores it see no change.Macaw.Component.Context.new/1refuses a locale that is noLocaleas{[:preferences, :locale], :not_a_locale}. The kit's:contextcheck also renders every fixture under a German locale,{:locale, :german}, so a component that writes only in English may see new findings.
v0.12.0 (2026-11-16)
Contained values that tick and answer hooks, a context that knows the display, slot reducers, on macaw_data 0.18 (#52, #54, #62). A contained value can step itself on its host's ticks, take an easing clock and answer what its hook asks; the context carries the display's pixel ratio and the motion preference, and the budget and the reducer read them; a slot can name how its rows may be reduced, and a document parameter's variables bind as qualified parameters. This release is breaking: the budget and the reducer take the context, proxy paths carry a digest, a hook file must default-export its hook, and macaw_component depends on macaw_data ~> 0.18.0.
Upgrading from 0.11.x
- Depend on
macaw_component ~> 0.12.0andmacaw_data ~> 0.18.0. 0.11 was on macaw_data 0.14. For any call you make into macaw_data directly, follow its upgrading notes for 0.15 through 0.18. The likeliest to reach a component's host:Macaw.Data.Finish.ceiling/2refuses a budget that is neithernilnor a positive integer; a source's table naming a window field refuses rows out of that field's order; a column of{x, y}number pairs packs and infers as:point(Macaw.Data.Table.column_type/2), where it was:term; andMacaw.Data.Window.check/2refuses a malformed axis, a region key that is no name and a malformed box, where it raised or passed. - A host asking a slot's budget or reducer passes the instance's context.
Macaw.Component.budget/4andMacaw.Component.reducer/4take the%Macaw.Component.Context{}in place of a size, and read itssize. A component's ownbudget/3andreducer/3need no change: they are called as before, at ratio 1. To count device pixels, definebudget/4orreducer/4and readcontext.ratio. - A host serving proxy routes serves them on the new paths.
Macaw.Component.Proxy.path/3answers/macaw/proxy/<component>/<route>/<digest>?<values>, the digestMacaw.Component.Proxy.digest/1of the route's{url, types}. Register each route under its digest. - A hook file default-exports its hook object:
export default {…},export default Nameorexport { Name as default }.use Macaw.Componentrefuses a declared hook file it can't read or that exports its hook by name only, so such a component no longer compiles until its file is changed. - Code that matches exact lists sees more.
Macaw.Component.Client.attributes/2addsdata-mw-requests(Macaw.Component.Client.requests_attribute/0);Macaw.Component.Declarations.keys/0hasrequests;Macaw.Component.Context.fields/0hasratioandmotion. A change of ratio or motion re-initializes a contained value. - A fixture or test calling the kit may see new findings: the
:contextcheck renders every fixture at ratio 2 and under reduced motion, and:budget,:containedand:declarationsfind more (see the changes below).
Changes
- Depends on macaw_data 0.18 (#52, #53, #62, #63). On
macaw_data ~> 0.18.0(was~> 0.14.0in 0.11.0). The conformance kit reads a fixture's rows throughMacaw.Data.Table.rows/1as before, and its table has no source origin, so 0.17's window-order rule doesn't reach it. A fixture's table with a column of number pairs is packed as:pointunder 0.18 and renames through the:bindingscheck as before, which a test holds. macaw_component calls noMacaw.Data.Window.check/2. No fixture, check or call needed changing. - Breaking: the budget and the reducer read the context's pixel ratio (#60, #61, spec/01 §1, §1.4, spec/04 §2).
Macaw.Component.budget/4andreducer/4take the instance's%Macaw.Component.Context{}in place of a size, and read itssize. A component may define the optionalbudget(slot, settings, size, context)andreducer(slot, settings, size, context), which are called in place ofbudget/3andreducer/3and readcontext.ratio, so a component counting device pixels asks twice the points on a 2× display.budget/3andreducer/3are called as before, at ratio 1, so no component changes. A host passing a size passes its context instead. The kit's:budgetcheck asks each slot at ratio 1 and 2, and a budget or a reducer's count that falls as the ratio rises is{:budget_falls, …}or{:reducer_falls, …}. - Spec: observation's contract shape (#54, #59, spec/02 §8.6, §8.7). What a component may declare in
observes, that an observation's event name is its vocabulary spelling, and that observations are not events: a component may declare an event named as an observation beside observing it. The transport, a hook's report carried to the host's observation plan, stays open until macaw#167 settles it, and until then no hook reports an observation. No code changes. - New: a slot's reducer, and qualified parameters of a document parameter (#54, #57, spec/01 §1.1, §1.4). The optional
reducer/3names how a slot's rows may be reduced,{name, count},:noneornil, which a host puts in the slot's request asreduce:, throughMacaw.Component.reducer/4. The optionalvariables/1answers the variables of the document a{:document, type}parameter holds as qualified parameters,"<qualifier>.<variable>", throughMacaw.Component.variables/2. Each is bindable when it has a default and a type other than:term.settings/2checks a qualified literal against its parameter, anddeclarations/2never hands one todeclarations/1.Macaw.Component.bind/3checks a cell's settings, literals and{:state, name}bindings, against declared state sources::unknown_state,:not_bindable,:bindable_without_default,:state_typeand:state_values. The kit's:budgetcheck finds a bad reducer.:declarationsfinds variables that fault or are impure, and:containedbinds the bindable qualified parameters. - New: the context's pixel ratio and motion preference, and a hook's requests and size reports (#54, #56, spec/02 §2, §8.5).
Contextgainsratio, the display's pixel ratio (a positive number, default1), andmotion,:fullor:reduce(default:full,Macaw.Component.Context.motions/0); a change of either is a re-initialization from the value replaced (init/4). The client module exportsrequest(hook, name, payload)("mw-request"),onAnswer(hook, name, callback)("mw:answer"),pixelRatio()andreportSize(el, {width, height, ratio})("macaw:size"), named byMacaw.Component.Client.request_event/0,answer_event/0andsize_event/0.Macaw.Component.Client.attributes/2addsdata-mw-requests(requests_attribute/0), which breaks code matching its exact list. The kit's new:contextcheck renders every fixture at ratio 2 and under reduced motion, and its:declarationscheck finds an undeclared request or another instance in a hook's attributes. - Breaking: proxy paths carry the route's digest (#54, #58, spec/01 §1.8).
Macaw.Component.Proxy.path/3answers/macaw/proxy/<component>/<route>/<digest>?<values>. The digest isMacaw.Component.Proxy.digest/1, the first 16 hex digits of Macaw.Layers.Document.digest/1 (nowMacaw.Base.Encoding.digest/1) of{url, types}, so two placements declaring one route name with different templates no longer collide. A host serves the proxy on the new paths, its routes registered under their digests. - Breaking: a hook file's default export is the hook object (#54, #58, spec/01 §1.8).
use Macaw.Componentreads each declared hook file at compile time, and refuses one it can't read or whose default export is notexport default {…},export default Nameorexport { Name as default }. Editing a hook file recompiles its component. This breaks a component whose hook file exports its hook by name only. - New: the contained value's optional callbacks (#54, #55, spec/02 §7.1–§7.5).
init/3takes the value it replaces, andMacaw.Component.init/4calls it, orinit/2without it.tick_interval/1andtick/2let a value step itself on its host's ticks, throughtick_interval/2andtick/3.clock/2is the easing clock that a host that ticks gives before each batch, throughclock/3.request/2answers what a hook asks, throughrequest/3, under the names a new declaration,requests, lists. The kit's:containedcheck finds unpaired tick callbacks, a clock without ticks, bad intervals, impure steps and unanswered requests. A fixture can giverequests:payloads. There is no render projection: copying a value of 2,500 items' scene data between processes takes about 1 ms (scripts/crossing.exs). A component without the new callbacks is unchanged, but code listingMacaw.Component.Declarations.keys/0seesrequests.
v0.11.0 (2026-11-11)
Event links: controls that work with no socket (#48). A host can give the context a link builder, and a component then renders a control as a plain <a href> before the socket connects, so a click works on a page served without one. Nothing breaks: a component that doesn't ask for a link renders as before.
Upgrading from 0.10.x
- Depend on
macaw_component ~> 0.11.0. No call changes. - Code that lists every context field sees one more:
Context.fields/0haslink. - To make a control work before the socket connects, give the context a
linkbuilder and render<a href={Client.link(@context, name, value: v)}>when it answers anhref, and the buttonClient.event/3makes when it answersnil(spec/02 §8.4).
Changes
- New: event links, for controls that work with no socket (#48, #49, spec/02 §8.4). The context gains
link, the host's link builder:nil, or a function of one argument from an event (%{instance:, name:, value:, identity:}, as terms) to thehrefit would give.Client.link(context, name, opts)answers thathrefin:socketless, andnilin every other mode or with no builder, so a component renders the control as<a href>before the socket connects and as the buttonevent/3makes once it does. A link carries no event wire.Context.new/1refuses alinkthat isn't a function of one argument,{[:link], :not_a_function}. Nothing changes for a component that doesn't call it.
v0.10.0 (2026-11-10)
The event wire at the edge (#44). JSON is the wire's representation, and Client.event/3 is its outbound edge: a component hands it terms, never a JSON spelling. A hook can now send an event it works out in the browser. Nothing breaks: every call that worked before writes the same payload.
Upgrading from 0.9.x
- Depend on
macaw_component ~> 0.10.0. No call changes. - Stop spelling values for the wire. Pass a
DateTime, a point{lon, lat}or a literal color toClient.event/3as it is, instead of its text. - To emit from a hook, put
Client.attributes(@declarations, @context)on the hook's element and callemit(this, name, {value})from/macaw_component/client.js(spec/02 §8.2).
Changes
Client.event/3takes terms, not JSON (#44, #45, spec/02 §8.3). It is the wire's outbound edge: a component hands it the terms it holds, and aDateTimeinvalue:oridentity:is written as its ISO 8601 spelling in UTC, shifted there from another zone; a point{lon, lat}invalue:as[lon, lat], and a literalMacaw.Layers.Coloras its CSS hex. Before, each was a wrong call and a component spelled it itself. Every other value is written as before; another struct or an atom is still a wrong call.- New:
Client.attributes/2(#45, spec/02 §8.1).attributes(declarations, context)isattributes/1's two attributes plusdata-mw-instance(instance_attribute/0) anddata-mw-events(events_attribute/0), what a hook that emits events needs.attributes/1is unchanged. - New:
emitin the client module (#45, spec/02 §8.2).emit(hook, name, {value, identity})sends an event a hook works out in the browser, such as a brush's range, as the same"mw-event"a renderedClient.event/3sends, aDatewritten in UTC. It throws on an event the component doesn't declare.namesgainsinstanceAttribute,eventsAttributeandeventName.
v0.9.0 (2026-11-10)
Events reach the host (#22, #39). A component can say what its events do by default, and carry them from the browser to the host, which macaw's state on a surface reads (macaw spec/03 §1.3, §1.6). Both are new; nothing changes for a component that uses neither.
Upgrading from 0.8.x
- Depend on
macaw_component ~> 0.9.0. No call changes. - Code that lists every declaration key or mode feature sees one more of each:
Declarations.keys/0hasactionsafterevents, andMode.features/0ends with:events. - To make a click reach the host, splice
Client.event(@context, name, value: v)into the element (spec/02 §8.3), and declare the event; the kit checks both.
Changes
- New: default actions (#22, #40, spec/01 §1.6). A component declares
actions, each%{on: event, set: parameter, value: {:event, path}}: what its events do when its placement says nothing, each setting one of its own bindable parameters from one of the five event paths,Declarations.event_paths/0(macaw spec/03 §1.3).Declarations.new/2judges them, every fault at once under[:actions, i]. The default is[], so a component that declares none is unchanged;keys/0is fourteen,actionsafterevents. The kit's:declarationscheck finds a component whose actions are refused. - New: the event wire (#39, #41, spec/02 §8.3).
Macaw.Component.Client.event(context, name, value: v, identity: id)answers the attributes that make an element emit an event, for HEEx to splice into its tag:phx-click="mw-event"(event_name/0) and onephx-value-mw(event_attribute/0) holding{"instance", "name", "value", "identity"}as JSON, so a host writes onehandle_event/3for a whole surface (macaw spec/03 §1.6), names keep their case, and no hook or asset is needed. It renders in live and socketless and answers[]in neutral and print, the new mode feature:events.valueis JSON data andidentitya map of scalars; anything else is a wrong call. The kit checks it::modesfindsphx-clickor aphx-value-attribute in neutral or print ({:event_wire, element}), and:declarationsreads every rendered payload ({:bad_event_payload, text},{:undeclared_event, name},{:foreign_instance, id}). Nothing changes for a component that doesn't call it, butMode.features/0has seven features.
v0.8.0 (2026-11-10)
Errors are values, on macaw_layers 0.5 and macaw_data 0.14 (#12). This release is breaking: a failure in macaw_component is now answered as a value, and a raise has to be asked for by name. It is also breaking for an adopter pinning macaw_layers ~> 0.4 or macaw_data ~> 0.13.
Upgrading from 0.7.x
- Depend on
macaw_layers ~> 0.5.0andmacaw_data ~> 0.14.0. For any call you make into either directly, follow its own upgrading notes. The one a component is likeliest to make isMacaw.Layers.Theme.cue/1, which now answers{:ok, cue}. - A host resolving bindings matches
Slot.resolve/3's{:ok, resolved}, or callsSlot.resolve!/3to keep the raise. - A test using the conformance kit fails on misuse with findings, where it raised
ArgumentError. A caller ofConformance.checks/1matches{:ok, checks}. - A fixture that binds deliveries naming their schema adds
schemas, or the:bindingscheck answers{:no_schema, slot}.
Changes
- Breaking: on
macaw_layers ~> 0.5.0(was~> 0.4.0) andmacaw_data ~> 0.14.0(was~> 0.13.0) (#35, #12). A drawn state's glyph readsTheme.cue/1's{:ok, cue}. Nothing else here calls what either changed. - A property holds the kit to findings over generated options (#35):
Conformance.check/3never raises, and every finding is worded. On macaw_layers 0.4.0 it failed 3 seeds in 40, on a tuple in a fixture's key path (fixed in macaw_layers 0.5.0). mix hex.publishruns the family's drift check first (#38, #27): aci/copy that is edited, missing or behind the reference stops the release, naming it.- A test holds the README's install pin to
mix.exs's version, and the status line no longer names one (#37, #26). - The kit's fixtures take
schemas(#19): each slot's schema, a%Macaw.Data.Schema{}or its attrs, carried by every context the kit builds, so a component that reads units or labels through its context is checked as it draws. A bound delivery naming a schema version the fixture doesn't give is{:no_schema, slot}from the:bindingscheck, and one it gives another of{:schema_mismatch, slot, given, delivered}. A component whose fixtures bind deliveries that name their schema adds the schemas to them. - Errors are values is the library's rule (spec/00 §4, #34, #12), and CI runs the family's raises check (
ci/raises.exs, with the reasoned allowlistci/raises_allowlist.exs): a raise, throw or exit inlib/outside it fails the pipeline. Properties hold the readers to it over generated malformed input. - Breaking:
Slot.resolve/3answers{:ok, resolved}, and for a bindingcheck/3refuses, its faults, where it raised (#33, #12);Slot.resolve!/3raises there. A host resolving checked bindings matches{:ok, resolved}or moves toresolve!/3. - An unknown mode or feature (
Mode.allows?/2) and an unknown drawn state (Drawn.pick/1,role/1,words/1) are guards now, so a wrong call is aFunctionClauseErrorwhere it was anArgumentError(#33).use Macaw.Component's checks answer values and the macros raise them, unchanged for a component author. - Breaking: the conformance kit answers its misuse as findings, never a raise (#32, #12).
check/2andcheck/3judge their arguments before anything renders and answer every misuse as{:kit, {{"options", nil, nil}, fault}}, a fault by path: an unknown check ({:enum, checks}at[:check]), a module that isn't a component (:not_a_componentat[:component]), an unknown option (:unknown_key), an unknown check set ({:enum, sets}at[:check_sets, i]), fixtures that aren't a non-empty list of maps of fixture keys, and bindings the context refuses (under[:fixtures, i]), where each raisedArgumentError. A test using the kit fails with every one named;format/1words them.checks/1answers{:ok, checks}, an unknown set{:error, [{[], {:enum, sets}}]}: a caller ofchecks(set)matches{:ok, checks}.usestill refuses a missingcomponent:, an unknown option and an unknown check set while the test compiles.
v0.7.0 (2026-11-05)
On macaw_data 0.13 (#30, #31). This release is breaking only for an adopter pinning macaw_data ~> 0.12. macaw_component's own API is unchanged, and one kit check finds more.
Upgrading from 0.6.x
- Depend on
macaw_data ~> 0.13.0and follow its "Upgrading from 0.12.x" for any call you make into it directly. The ones to look for areMacaw.Data.Reduce.lttb/3andm4/3, andMacaw.Data.FFT.magnitudes/1andwindow/2, which now answer{:ok, value}or{:error, reason}. - A component whose declarations read a bindable parameter with a nil default now has a finding,
{:reads_bindable, name}, from the kit's:declarationscheck. Have it stop reading the parameter there.
Changes
- Breaking: on
macaw_data ~> 0.13.0(was~> 0.12.0) (#30, #31). - The conformance kit's
:declarationscheck probes a bindable:number,:textor:categoryparameter with a nil default (macaw_data 0.12.1), so a component whose declarations read one is the finding{:reads_bindable, name}. It was skipped.:time,:colorand:pointstay unprobed, with a nil default as with a real one (#28, #29).
v0.6.0 (2026-11-04)
On macaw_data 0.12, and an order key can name a role (#20, #21). This release is breaking for an adopter pinning macaw_data ~> 0.11. macaw_component's own API only grows: a component, a host and a fixture that use no role key change nothing else.
Upgrading from 0.5.x
- Depend on
macaw_data ~> 0.12.0and follow its "Upgrading from 0.11.x" for any call you make into it directly. In a component and in a test the one to look for isDelivery.rows/1, now{:ok, rows}: callDelivery.rows!/1for rows a delivery holds, or match the value. A served map built by hand addsstale. - A host resolves a slot's order before its request. Call
Macaw.Component.resolve_order(module, slot, settings, bindings)where it calledMacaw.Component.order/3, withbindingsthe slot'sSlot.resolve/3map, and put its answer in the request and the pooling key. The errors are the same{:error, {:bad_order, answer}}, and a field-keyed order answers as it did. A host left onorder/3passes a role key on toMacaw.Data.Source.Order, which refuses it. - A component may ask for an order by role:
def order("rows", _settings), do: [{{:role, "t"}, :desc}]. It needs nothing else, butbudget/3doesn't see bindings: if an optional role is left unbound its key drops, and a budget still caps the rows in the source's own order. - A fixture's
bindingsmust be resolved for a role in the order. The kit's:ordercheck resolves a role-keyed order through a fixture's bindings for the slot, so a required role in the order, awindowrole's field included, must be there, else{:unresolved_order, slot, answer}. A fixture without bindings for the slot isn't resolved.
Changes
- Breaking: on
macaw_data ~> 0.12.0(was~> 0.11.0) (#20, #23). - The conformance kit's
:bindingscheck reads a table delivery's rows throughTable.rows/1's value: rows it refuses (a hand-built delivery's) are the finding{:unrenamable, slot, faults}, never a raise. The rename keepsserved, withstale, unchanged (#20, #23). - New: an order key can name a role (#21, #24, spec/01 §1.4).
order/2may answer{{:role, name}, direction}, beside field keys, so a component can ask for the newest rows by itstrole whichever field a document binds.Macaw.Component.order/3checks each against the slot's declarations: an undeclared role, one named twice, amanyrole and a role with a type that has no order are{:bad_order, answer}. The newMacaw.Component.resolve_order/4answers the order in fields for the slot's resolved bindings, for the request; a host calls it in place oforder/3. The conformance kit's:ordercheck runs both, its new finding{:unresolved_order, slot, answer}a fixture's bindings that lack a required role in the order. Macaw.Component.order/3answers{:bad_order, answer}for an improper list, where it raised fromMacaw.Data.Source.Order.shape/1(#24, macaw_data#169).- Spec 02 §6 names the
stalestate's fact, a delivery'sserved.stale(#20, #23).
v0.5.0 (2026-11-03)
On macaw_data 0.11 (#17, #16). This release is breaking only for an adopter pinning macaw_data ~> 0.10: follow macaw_data's "Upgrading from 0.10.x". macaw_component's own API is unchanged.
- Breaking: on
macaw_data ~> 0.11.0(was~> 0.10.0) (#17, #16). macaw_data 0.11 answersWindow.position/1in integer Unix µs for every kind of time, compares windows of mixed kinds by instant ({:window, :mixed}is gone) and reduces a Date or NaiveDateTime series as a UTC one; macaw_component calls none of these, and its behavior is unchanged. An application on macaw_data 0.10 follows its "Upgrading from 0.10.x". - The kit's checks are stated from
Conformance.checks/0rather than as a count: its doc, the README and spec 04 §2 said thirteen after 0.3.0 added:order, the fourteenth, and spec 04's table now has the:orderrow. A doctest holds the list (#18, #13).
v0.4.0 (2026-11-02)
On macaw_data 0.10 (#15, #14). macaw_data 0.10.0 answers errors as values: Delivery.new/2 answers {:ok, delivery} or {:error, faults}, with new!/2 its raising twin, and so do Finish, Order.sort/3 and others (see its "Upgrading from 0.9.x"). This release is breaking for an adopter pinning macaw_data ~> 0.9; macaw_component's own API is unchanged.
- Breaking: on
macaw_data ~> 0.10.0(was~> 0.9.0). - The conformance kit's
:bindingscheck rebuilds a fixture's renamed delivery throughDelivery.new/2's value: one it can't rebuild is the finding{:unrenamable, slot, faults}, never a raise (spec/04).
v0.3.0 (2026-11-01)
On macaw_layers 0.4 and macaw_data 0.9, and a slot may ask for a row order (#11, macaw#241). This release is breaking for an adopter pinning macaw_layers ~> 0.3 or macaw_data ~> 0.7: follow their upgrade notes (macaw_layers 0.4.0's Form.read/3 refuses every URL without urls:, and a theme refuses untrusted text; macaw_data 0.8.0's tables are chunked and opaque, 0.9.0's request carries an order). macaw_component's own API only grows.
- Breaking: on
macaw_layers ~> 0.4.0andmacaw_data ~> 0.9.0(were~> 0.3.0and~> 0.7.0). - New: an optional callback
order(slot, settings), the row order a slot asks its source for, andMacaw.Component.order/3,[]without it and{:error, {:bad_order, answer}}for an answer of no order's shape; the conformance kit checks it (spec/01 §1.4).
v0.2.2 (2026-11-01)
Slot.check/3refuses a field amanyrole lists twice,{:duplicate, field}at[role]: a table showed the column twice, a chart would draw the series twice (#10, macaw#237).
v0.2.1 (2026-10-31)
- The drawn states' notices have a static stylesheet,
priv/static/macaw_component/drawn.css(Drawn.stylesheet_path/0, served atDrawn.stylesheet_url/0): a rule for every class a notice emits, every color a theme custom property with the default theme's fallback, and the glyph kept visible in forced-colors mode (#6, macaw#196, spec/02 §6). - The context carries each bound slot's schema (
schemas,%{slot => %Macaw.Data.Schema{}}), andContext.label/3andContext.unit/3read a field's label and unit from it, falling back to the field's name andnil, so a component heads a field in the schema's words (#5, macaw#196, spec/02 §2). - CI runs the family's dependency advisories guard (
ci/advisories.exs, with a reasoned allowlist that defaults empty), so a locked package with a security advisory, or a retired one, fails the pipeline; phoenix_html is locked at 4.4.0 (EEF-CVE-2026-117645) (#4, macaw#214).
v0.2.0 (2026-10-30)
Upgrading from 0.1.5
macaw_component's own functions are unchanged; what changes is the dependencies' terms that pass through them, to a component and to a host.
- Depend on macaw_layers
~> 0.3.0and macaw_data~> 0.7.0. Their upgrade guides ("Upgrading from 0.2.4" and "Upgrading from 0.6.1") apply to any call you make into them directly. - The context's theme holds color terms and string names.
context.theme, and the theme the conformance kit'stheme:option takes, is macaw_layers 0.3's%Macaw.Layers.Theme{}: its series, furniture and literal colors are%Macaw.Layers.Color{}, never CSS text, and its names are strings (Theme.default().name == "default", slots and role names"info"). A component that writes a theme's literal into markup writesMacaw.Layers.Color.to_css/1of it; code that matches:defaultor a slot atom in a theme's fields matches strings. A theme built with a CSS string as a color raises atTheme.new/1: write~RGB"#3b6fa8"orColor.parse!/1.Macaw.Component.Drawn.role/1andglyph/1answer as before, andTheme.cue/1takes either spelling. - A
:colorvalue is a color term. A:colorparameter's default and value (Macaw.Data.Parameter), and a:colorfield's values in a delivery, are a%Macaw.Layers.Color{}literal or a theme-relative typed color ({:color, "good"}); a string,"#2e7d32"or"red", is refused. Declare defaults with~RGB, parse CSS text at your input edge withColor.parse!/1, and draw withColor.to_css/1. The rendered markup is unchanged: the drawing rules and the:colorscheck still read literal colors as CSS text in presentation attributes (spec/02 §5, spec/04 §2). - Category values read back as strings. A
:categorycolumn of a packed delivery (Delivery.table/2, thenTable.rows/1,get/2orcolumn/2) answers"ok"for:ok;nil,trueandfalseare kept. Compare with strings, or withMacaw.Data.Operations.same?/2. A delivery's rows read withDelivery.rows/1are as the source gave them, as before. - A schema's names are strings, and its version changes. A
%Macaw.Data.Schema{}a slot is checked against holds its field names as strings;Slot.check/3andSlot.resolve/3take either spelling and answer as before. EverySchema.version, and the operations registry's digest, differs from macaw_data 0.6's: regenerate any stored version or cache key. A stylesheet's path (Macaw.Component.Stylesheet.path/1, the SHA-256 of its bytes) is unchanged.
Changes
- Breaking: on
macaw_layers ~> 0.3.0andmacaw_data ~> 0.7.0(#3, dco-tek/macaw/macaw#188): colors are terms, a theme's names are strings, category values read back as strings, and every digest and schema version changes. No code of macaw_component's changed; the guide above lists what reaches a component or a host.
v0.1.5 (2026-10-30)
- The shared client module for hooks,
priv/static/macaw_component/client.js: the announcer (two regions found or created once per page; requests queued, merged and rate-limited, undeclared names dropped) and the client bus (window.MacawBus; undeclared keys refused, values passed through uninspected). One ES module, no build step, no dependencies; served withPlug.Static, from: {:macaw_component, "priv/static"}and imported from/macaw_component/client.js.privships in the package (dco-tek/macaw/macaw#142, spec/02 §8). %Macaw.Component.Context{}gainsbindings, the cell's resolved bindings,%{slot => %{role => field | [field, …]}},%{}by default and checked byContext.new/1at paths under[:bindings];Context.field/3answers the field bound to a role, amanyrole's list, ornil. A slot's binding now reaches the component, inside its context (dco-tek/macaw/macaw#194, #2, spec/02 §2).Macaw.Component.Slot.resolve/3: the resolved role → field map of a bindingcheck/3passes, an unboundwindowrole holding the window field and an unbound optional role absent; the one source of the defaulting rule for the core and adopters (dco-tek/macaw/macaw#194, #2, spec/01 §1.3).- The conformance kit: a
bindings:fixture key,%{}by default, carried by every context the kit builds; and a thirteenth check,:bindings, which renames each slot's bound fields to fresh tokens and finds{:ignores_binding, slot}when the render doesn't follow them. Fixtures without bindings are not probed (dco-tek/macaw/macaw#194, #2, spec/04 §2, §3). Macaw.Component.Client.attributes/1: thedata-mw-announcesanddata-mw-localattributes that hand a component's declared announcement names and bus keys to the client, withannounces_attribute/0,local_attribute/0,module_path/0andmodule_url/0.
v0.1.4 (2026-10-29)
macaw_data ~> 0.6.0: a delivery keeps the rows its source gave (dco-tek/macaw/macaw#185, #186).
v0.1.3 (2026-10-28)
- The macaw logo in the docs and the README (macaw#175).
v0.1.2 (2026-10-28)
- On Hex: depends on
macaw_layers ~> 0.2.2andmacaw_data ~> 0.5.3from Hex instead of their git tags; the README installs from Hex (macaw#155). - The README opens with the early-release notice (macaw#174).
v0.1.1 (2026-10-28)
- Dependencies named by their
dco-tek/macawgroup paths, on macaw_data v0.5.2 (macaw#152). - Package metadata for Hex: the public home, the changelog link, the files shipped, and docs with
ex_doc(macaw_compose#155).
v0.1.0 (2026-10-28)
- macaw_component v0.1.0: the component contract, rendering, packages and the conformance kit (macaw_compose#143)