All non-script changes from scripting branch
The major changes are
- [Breaking] No two components in a constraint system can have the same name.
- [Breaking] The value of a HotDrink variable is updated at once, and does not need to wait for the current promise to be settled.
- Allow variable references to accept
nullvalue.- Clarification: Only the flow types has been changed.
- This might not be that breaking after all.
- Add simpler editing of components and variables with the
editmethod.- For example
cs.edit.comp.varwould return value of the hotdrink variablevarin componentcompfor the constraint system found in thecsvariable. - For example
cs.edit.comp.var = 123would set the value of the hotdrink variablevarto123in the componentcompfor the constraint system found in thecsvariable. - Nested components are not supported
- Use the suffix
_selfto get either component or the variable reference.-
cs.edit.comp_selfwould get you the component -
cs.edit.comp.var_selfwould get you the variable reference
-
- Editing is most useful when debugging a constraint system, e.g., in the console of a web browser
- For example
- Allow
Subscriptions to haveadditionalSubscriptions- This makes it possible to attach multiple
Subscriptions to the mainSubscriptionto simultaneously unsubscribe from.
- This makes it possible to attach multiple
- Add
variableListenerandretainingVariableListenerto simplify listening to changes in variables.- Note that it will not listen to changes in variable references.
- Add generic binders for HTML specific view:
bidirectionalElementListenerandelementAttributeBinder - Allow
ConstraintSystem,Component,Constraint,Method,VariableReference, andVariableto be serialized.- ConstraintSystem to json can be done with
constraintSystemToJson(system) - json to cs can be done with
constraintSystemFromJson(json)
- ConstraintSystem to json can be done with
And some minor changes
- Generally improve the types.
- Flow linting now throws errors instead of a warning, see
.flowconfigfor the active linting rules. - Add back missing
initmake step required for the first installation. - Fix the whap tutorial.
- Update all dependencies to their latest version.
- All files are now
//@flow strictwhich means linting is stricter. - All
==have been replaced with===. - Lower delay in tests to make them run quicker.
-
ownerandsysteminComponentcan no longer beundefined, but stillnull. - Expose owner getter in
Component. - Change the fresh names generators to not use
#but rather_to make automated names work with editing. - Add
hasVariableReferenceNametoComponent. - Add
componentByNametoConstraintSystem. - Add
allComponentstoConstraintSystem. - Expose
optionalgetter inConstraint. - Expose
ownerandowningReferencegetters inVariableReference. - Add
qualifiedNamefunction toVariableReference. - Disable logging when testing.
- Add
pExactStringsandpTryUnnamedto parsing. - Throw exception instead of asserting resolving constraint system graph. This makes it possible to undo whatever made the system fail in a try-catch block.
Edited by Karl Henrik Elg Barlinn