Repository navigation
v0.6.5 — three-part versions again, wrapping without a width, clearer checks
v0.6.4.1 numbered a release with a fourth part, and npm reads package.json's version as
semver, which has three: after npm install, npx declare-help, declare-verify and the
other tools stopped with "Invalid Version". This release returns to three parts, and carries
what building Ledger and Conduit (RealWorld) turned up.
The flagship calendar is 164.4 KB gzipped at this tag.
Breaking: 1 change to make — npx declare-changes app.declare lists the ones in your program.
Breaking changes
a WrappingLayout with no width stacks its children → lays them in one row
A view whose width comes from what it holds has no edge to wrap at, so it stacked every child on a row of its own; it now lays them in one row, as wide as they are.
pages: View [ layout: WrappingLayout [ spacing = 4 ],
View [ width = 30, height = 30 ], View [ width = 30, height = 30 ] ]
pages: View [ width = 100%, layout: WrappingLayout [ spacing = 4 ],
View [ width = 30, height = 30 ], View [ width = 30, height = 30 ] ]
Docs: WrappingLayout
Watch for: a row of tags, page numbers or words that used to stack now runs across, and may run past the edge of what holds it; give the view a width (width = 100%) for it to wrap there.
New
A control's onClick and onPointerDown take the event at any override, in a class or
where it is used: onClick(e: PointerEvent) says where the click landed, in the control's
own coordinates. Before, only a subclass could, and an override where the control is used
was refused as an incompatible signature.
Smaller changes
- A method that writes an attribute its own element binds with a constraint is refused where
it is written:value = { src }besidecommit(t) { value = t }compiled, and threw at the
first keystroke. The message names the form that does what was meant — a declared attribute
that starts from the same value (edited: string = { src }), withvalue = { edited }.
It found the same mistake, left by 0.6.0's migration, in the homepage's and the docs'
live examples, the sampler's rename field and the source viewer's editor, all of which
threw as soon as someone typed; they take edits again. - A program method named like a built-in (
split,find) no longer makes the library's own
call of that built-in refused: aDatePickerin a program with asplit()method reported
DECLARE7001 at a line inside the library. - Focus given back to a container when the focused view goes away (a cell's editor closing on
Return) shows the keyboard ring only if the focus that went away showed it. - Overriding a child's method where an element is used (
remove.press() { … }) is refused
with a message that says so, and names the two ways to write it, instead of the rule for
attributes and a parse error after it. link's reference says plainly which links the build checks: a name ashowsor an
anchordeclares; one with a/in it is a location the program parses, which the crawl
checks.- declare-verify: a behaviour script runs in the laptop window rung 4 boots in (1280×800)
unless it exports a device; a path written with a class name (app.main.HomePage) is told
which child that is (0);expect.textno longer says a row's words twice; and a locator
that matched nothing while motion was in flight says motion may be why, rather than that it
is.