This change makes it possible to use the "zoom" function from
microlens-mtl to zoom in on a state field in EventM. This change adds a
re-export of "zoom" to Brick.Types for convenience.
This is a breaking API change that changes handleEditorEvent to take
BrickEvents instead of Events. This paves the way for handling Brick's
mouse events in the editor.
This change makes the renderEditor function take the content drawing
function that "editor" previously took. This does a better job of
separating presentation and representation concerns, and the content
drawing function never should have been part of the state to begin with.
This change removed the corresponding lens and Editor accessor for the
drawing function, removed the smart constructor parameter, and moved it
to be a parameter of the renderEditor function.
This change makes it possible for brick to extent the event space using
its own event notions in addition those provided by Vty and the
application itself. This means we no longer need the user to provide the
type and appLiftVtyEvent went away. This makes pattern-matching in event
handlers a little noisier with the benefit that we can now add events
like mouse clicks or drags to the event type.
This isn't a fully backwards-compatible change, but the only thing
that needs to be modified for programs involves adding a type parameter,
which will be either `String` or `Text`.
This experimental change makes it possible to:
* Avoid runtime errors due to name typos
* Achieve compile-time guarantees about name matching and usage
* Force widget functions to be name-agnostic by being polymorphic
in their name type
* Clean up focus handling by making it possible to pattern-match
on cursor location names
The change also made many types more heavyweight and in some cases
this is unpleasant when we don't want to have to care about names.
But in those cases we can just use 'n' or '()' depending on how
concrete we need to be. I'm not yet sure how this is going to play
out in practice.
instance for Widget
- This makes the module layout more predictable since Brick.Widgets.Core
now (mostly) only contains widgets and widget transformations
- Utility functions closely related to types are now in Brick.Types
- Brick.Types.Internal contains types used internal by the renderer,
some are re-exported by Brick.Types
- Changes the editor constructor to take a line limit
- Changes the editor drawing function to take [String] instead of String
- Changes the editor to use a viewport that scrolls both horizontally
and vertically
- Uses the latest text-zipper release (so cabal update)