Add Python module
This adds just button and label, but is scriptable from Python.
Tweak ownership of use_future
Reduce cloning in the fast path but do it explicitly on change.
Add data to use_future
Now it's not one-shot, but will resubmit when the data changes.
Split demo into examples. Make async optional.
The async methods don't seem to show up in cargo doc, though. Why?
Add license and README
This is to encourage contributions.
Use EventSink rather than EventCtx in Cx
This makes the type of Cx cleaner (only 1 lifetime instead of 3). But
maybe it's not a great idea, as we may need EventCtx for other purposes
Add async support
Adds async-std as a runtime for futures, and adds a `use_future` method
to Cx for running a future and using its result.
Add `if_changed` method to Cx
Adds a method that skips the child subtree if the data has not actually
Scoped context for containers
The `Row` view now takes a closure for its contents, ensuring nesting.
Adopt View trait
Motion away from stringly typed descriptions and towards being able to
use arbitrary widgets.
The next step is more scope-like contexts for containers.
This lets us get the counter example working.
Wire up action queues
Put events such as button clicks into a queue, and make available. This
is wired up through buttons.
Also a small fix to trim at into_mutation if there are trailing deletes.
Add unique identity
Every insert gets a new unique id. This is plumbed through to widgets.
Not yet plumbed all the way through to app logic yet though.
Add flex widget
Take flex widget from Druid and adapt it so children can be reconfigured
Adds plumbing for mutations; seems to work but actions (button clicks
etc) are not there yet.
Start integrating Druid
As of this commit, there are widgets intended to be adapters between the
existing Druid and crochet worlds, but it does not yet actually run the
app logic or inflate a widget tree from the crochet tree.
More work on tree mutation
This adds an interface to iterate over a tree mutation.
A sequence approach to trees and mutations
A tree is now stored as a sequence of push and pop operations. A
mutation is a xi-style delta of this sequence.
Basic tree mutator
This is the bones of the tree mutation engine. What it does do:
* Allow building of trees with begin and end
* Tracks caller and sequence index
* Maintains pointer equality where possible
What it doesn't do:
* Allow body types other than String
* Have an API for skipping subtrees
* Have an API for accessing memoized data
* Integrate with Druid
But it's a start!