Releases: imba/imba
v1.4.0
Notable changes
- Introduce new root scope per file for more consistent self
- Fix export const
- Add
<input number=bool>
for numeric inputs - Only prevent native click if tap was prevented
- Print out compiler warnings in imbac and webpack loader
- Pass through stdio configuration from imbapack to webpack
- Don't include comments by default in webpack loader
- Disallow cross-scope calling of root 'def' functions (breaking change)
1.3.0 Prerelease
Lots of exciting things coming in Imba 1.3.
Event modifiers
Inspired by Vue, we have now added support for event modifiers, which makes it much easier to decouple your actions from the events triggering them. The modifiers supported thus far are;
- .stop
- .prevent
- .bubble
- .silent
- .self
We also added support for keydown/keyup modifiers:
- .enter
- .left
- .right
- .up
- .down
- .space
- .tab
- .esc
And mouse modifiers
- .left
- .middle
- .right
Proper documentation will follow when we move towards final release.
Form Input Bindings
Also inspired by Vue, we're adding basic support for binding form input values to the data, using the 'model' property on the input. It currently has most of the same functionality provided in Vue, so until we have docs in place you can learn about it in their guide :)
Changelog
- Add support for event modifiers (e.g.
<div :keydown.enter.halt=...>
) - Add support for form input bindings (e.g.
<input[data] model='myField'>
) - Allow all attributes on svg elements
- Remove deprecated selector-syntax
- Remove deprecated methods on Imba.Tag (object,width,height,append,prepend,style,setStyle)
- Remove deprecated methods on Imba.Event (keychar,keycombo,source)
- Remove deprecated Imba.isClient and Imba.isServer
- Improve performance of setText
- Improve performance of non-keyed tag lists
- 30% smaller library (now 53k minified, 14k gzipped)
1.1.1
1.1.0
v0.15.0-alpha.1
Fix scoping issue for tag cache
0.14.5
Changelog
tag.initialize
can now be defined / overridden- Dynamic flags
<div .{flag}>
works as expected - Added more missing attributes to html elements
- Allow defining properties with reserved names
prop watch:
now accepts a Function- Minor bugfixes
Notable changes
Custom initialize
If you need to initialize anything when a tag is spawned you can now override the initialize method.
It takes the dom-object as the only argument. Remember to call super
since initialize does link up the dom node with the tag.
Dynamic flags
Dynamic flags are now more usable, especially in tag trees. Imba now remember the previous value.
var items = [
{type: 'todo', id: 3421, title: "Release version"},
{type: 'project', id: 1252, title: "Imba"},
{type: 'todo', id: 12451, title: "Write releasenotes" }
]
tag list < ul
def render
<self> for item in items
<li.item .{item:type}> item:title
In the example above, each <li>
will have a className that reflects the type of item like <li.project>
, <li.todo>
. And if an item changes type (or the li is reused for another data-item) it will change the flag -- rather than adding the new now.