v0.13.0
Pre-release- Directory Structure
All non-components have been moved from the ui directory to the core directory.
Composers have been moved to the root directory.
- Core
Montage.create()
has been replaced by a specialize
method on the constructor. The specialize
method returns a constructor function that can be invoked with the new
operator. (For details see
Montage objects.)
- FRB bindings
Functional Reactive Bindings (FRB) have replaced the old bindings. More info >
- Component
Lifecycle methods
(See also Component draw cycle.)
enterDocument
is called every time the component's element is added to the DOM. WhenenterDocument
is called the element is already in the DOM.
The first timeenterDocument
is called, a Boolean with valuetrue
is passed in. In this situationenterDocument
replacesprepareForDraw
.exitDocument
is called every time the component's element is removed from the DOM. WhenexitDocument
is called the element is still in the DOM.dispose
is called when the component is discarded.
classList
Added a classList
property to all component instances. You can use this property with the same API as the element's classList
without impacting the draw cycle performance. The property can be used to great effect with FRB bindings to do things like: classList.has('complete') <- @owner.isComplete
.
DOM arguments
Components can now receive DOM arguments. A DOM argument is specified in the component markup by adding a data-arg
attribute and assign a name to its value.
DOM arguments can be referenced after the first enterDocument
with the extractDomArgument(name)
method.
When a component has a Template with parameters, each template parameter element is replaced with the corresponding component argument element.
- Template
Templates can now have DOM parameters. A DOM parameter is specified in a template using the data-param
attribute on the DOM node that represents the parameter. data-param
has the value of the parameter name.
- Serialization
A lot of the serialization code has been refactored to a separate project mousse and made more generic.
- Components
The contents of the montage/ui directory have been split between the ui directories of the core montage framework and the digit, matte, and native template packages.
The montage/ui directory now contains the following directories:
- base (contains abstract components, described below)
- condition.reel
- flow.reel
- loader.reel
- overlay.reel
- repetition.reel
- slot.reel
- [substitution.reel](http://montagejs.org/docs/substitution-component
.html) - text.reel (replaces dynamic-text.reel)
- component.js
Substitution
The substitution's API has substantially changed to a template based approach that makes use of the new component arguments API.
- Abstract components
In an effort to make basic components easier to create and more consistent, the abstract components now provide a super
class that widget sets can specialize with their own template. This is how the digit widgets are implemented.